Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL ==> UPDATE syntaxis error

Status
Not open for further replies.

nickske80

Programmer
Aug 2, 2003
55
0
0
BE
hello everybody,

I have this strange syntaxis error that i can 't seem to fix.

This is my code:

Dim strSQL As String

'record updaten
strSQL = "UPDATE " & mconT_Categorie & " SET "
strSQL &= mconA_ParentID & " = " & node.ParentID & ", "
strSQL &= mconA_Text & " = '" & node.Text & "', "
strSQL &= mconA_Icon & " = '" & node.Icon & "', "
strSQL &= mconA_BackGround & " = '" & node.backGround & "', "
strSQL &= mconA_passwd & " = '" & node.Password.Password & "', "
strSQL &= mconA_alwaysAsk & " = " & node.Password.AlwaysAskPassword & ", "
strSQL &= mconA_WrongPasswords & " = " & node.Password.WrongPasswordCount & ", "
strSQL &= mconA_TimesOpened & &quot; = &quot; & node.Statistics.TimesOpened & &quot;, &quot; <<====== ERROR
strSQL &= mconA_created & &quot; = #&quot; & node.Statistics.Created & &quot;#, &quot;
strSQL &= mconA_LastUsed & &quot; = #&quot; & node.Statistics.LastUsed & &quot;# &quot;
strSQL &= &quot; WHERE &quot; & mconA_ID & &quot; = &quot; & node.ID & &quot;;&quot;

cnn.Execute(strSQL)

if I leave the marked line out, it works perfectly.
But if I put it in, it doesn 't work anymore.

The name in the constant mconA_TimesOpened is wright because I use it more in the program.

The datatype in the program and in the DB is exactly the same as the other integers.

It would be greatly appreciated if anyone could find the error for me.

To search or to post - that is the question.
To search first and to post later. THAT is the answer.
 
What is the error message that you get?

DotNetDoc
M.C.S.D.
[2thumbsup]
---------------------------------------

Tell me and I forget. Show me and I remember. Involve me and I understand.
- Anonymous Chinese Proverb

-----------------------------------

If you can't explain it simply, you don't understand it well enough.
- A. Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top