Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

dhodgk...@jstarsoftware.com

2 views
Skip to first unread message

asthanaa...@gmail.com

unread,
Jan 16, 2008, 11:30:16 PM1/16/08
to
Hello VB experts can you help with a problem with my syntax.
With the code below I'm trying to update a field called 'date' and
'time' in a table
'visitor' , I get the following

run-time error '-2147217900 (80040e14)':
Syntax error in update query
any help much appreciated

conn.Open sConnString
Set cmd.ActiveConnection = conn
cmd.CommandText = "update visitor set [date]="'" & Text1.Text & "'",
[time]="'"&Text2.Text&"'" WHERE id="'" & tx_kh.Text & "'""
cmd.CommandType = adCmdText
Set rs = cmd.Execute
Set rs = Nothing
Set cmd = Nothing
conn.Close
Set conn = Nothing

when i move the cursor to some other line(other than query expression)
a space is introduced between the first double quote and first single
quote making the rest query expression a comment.

0 new messages