|
|
|
รบกวนขอโค้ดคำสั่ง แก้ไข ของ VB ฐานข้อมูล Access ด้วยค่ะ |
|
|
|
|
|
|
|
Code (VB.NET)
Dim objConn As New OleDbConnection
Dim objCmd As New OleDbCommand
Dim dtReader As OleDbDataReader
Dim strConnString,strSQL As String
strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\database\\mydatabase.mdb;Jet OLEDB:Database Password=;"
objConn.ConnectionString = strConnString
objConn.Open()
strSQL = "UPDATE customer SET " & _
" CustomerID = '"& Me.txtCustomerID.Text &"' " & _
" ,Name = '"& Me.txtName.Text &"' " & _
" ,Email = '"& Me.txtEmail.Text &"' " & _
" ,CountryCode = '"& Me.txtCountryCode.Text &"' " & _
" ,Budget = '"& Me.txtBudget.Text &"' " & _
" ,Used = '"& Me.txtUsed.Text &"' " & _
" WHERE CustomerID = '" & Request.QueryString("CustomerID") & "' "
objCmd = New OleDbCommand
With objCmd
.Connection = objConn
.CommandText = strSQL
.CommandType = CommandType.Text
End With
|
|
|
|
|
Date :
2014-01-28 12:12:55 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 04
|