|
您现在的位置: 爱51代码网 >> 范文 >> 文章正文 |
DOTNET零碎总结 VB.NET修改数据存在多个txtbox时,SQL语句的操作 . |
|
End If If Len(username) <> 0 And Len(password) <> 0 Then temp = username + password MsgBox(temp.Length) temp = Mid(temp, 1, temp.Length - 3) MsgBox("temp" + temp) MsgBox("current" + DataGridView1.CurrentRow.Cells(1).Value) Else temp = "" End If Dim strConn = "Data Source=192.168.1.110/orcl;User ID=test;Password=orcl" Dim dbcmd As OracleCommand Dim dbConnection As OracleConnection 毕业论文 'If username.Length = 0 And password = 0 Then Try dbConnection = New OracleConnection(strConn) dbConnection.Open() dbcmd = dbConnection.CreateCommand Dim temp2 As String temp2 = "update student set " + temp + " where sname=" + "'" + DataGridView1.CurrentRow.Cells(1).Value + "'" dbcmd.CommandText = temp2 MsgBox(temp2) 'dbConnection.BeginTransaction() dbcmd.ExecuteNonQuery() '返回改动的row行数 Catch ex As Exception MsgBox("修改失败") Exit Sub End Try ' Else ' MsgBox("请填入要修改的参数") 'End If End Sub 上一页 [1] [2]
|
上一篇文章: 《帝企鹅日记》观后感 下一篇文章: 没有了 |
|