If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Help updatecommand not updating
I wrote to his of code to update a staus field ina table. Somehow
nothing happens though no error was thrown eitheie. Where did I go wrong? Please help. Thanks in advance. Dim note As String Dim ds As DataSet = New DataSet() Dim query As StringBuilder = New StringBuilder() Dim query1 As StringBuilder = New StringBuilder() query.Append("Update ApptInfo Set ApptCompleted='True'") query.Append(" where ApptID='" + id + "'") Dim myConnection As OleDbConnection = New OleDbConnection(Me.GetConnectionString()) Dim ad As OleDbDataAdapter = New OleDbDataAdapter() ad.UpdateCommand = New OleDbCommand(query.ToString(), myConnection) Return ds |
#2
|
|||
|
|||
Help updatecommand not updating
I am not familiar with your code, but maybe...
If ApptID is type "Number," then you don't need to wrap "id" in single quotes... query.Append(" where ApptID=" + id ) "Fendi Baba" wrote: I wrote to his of code to update a staus field ina table. Somehow nothing happens though no error was thrown eitheie. Where did I go wrong? Please help. Thanks in advance. Dim note As String Dim ds As DataSet = New DataSet() Dim query As StringBuilder = New StringBuilder() Dim query1 As StringBuilder = New StringBuilder() query.Append("Update ApptInfo Set ApptCompleted='True'") query.Append(" where ApptID='" + id + "'") Dim myConnection As OleDbConnection = New OleDbConnection(Me.GetConnectionString()) Dim ad As OleDbDataAdapter = New OleDbDataAdapter() ad.UpdateCommand = New OleDbCommand(query.ToString(), myConnection) Return ds |
Thread Tools | |
Display Modes | |
|
|