update query

V

Van Eenoo Stefaan

Hey, who has an idea ?

The connection was placed in a common module, and works fine.

Where did I go wrong ?

'Command object creëren
Set cmm = New ADODB.Command
strsql = "Update tblTijdschriften " & _
" Set TijdschriftId = '" & txtTijdschriftId & "'," & _
" Tijdschriftnaam = '" & txtTijdschriftnaam & "'," & _
" WHERE tijdschriftId = '" & txtTijdschriftId & "';"
With cmm
..ActiveConnection = gcnn
..CommandType = adCmdText
..CommandText = strsql
..Execute options:=adExecuteNoRecords
..Execute
End With
 
S

Scott McDaniel

Is gcnn a valid ADODB.Connection? The error you're receiving looks to be an
ADODB error message (was there no text with it?).

What line does the error occur on? You can find out by setting a breakpoint
at the beginning of your code and using the F8 key to step through each
line.
 
V

Van Eenoo Stefaan

yes, gcnn is a valid connection. I used it to display values.

The text with the error was "Error in update statement"
 
S

Scott McDaniel

What line causes the error?

Van Eenoo Stefaan said:
yes, gcnn is a valid connection. I used it to display values.

The text with the error was "Error in update statement"
 
Top