|
-
Aug 10th, 2005, 10:55 PM
#1
Thread Starter
Member
-
Aug 10th, 2005, 11:01 PM
#2
Re: sql syntax error
Try this...
VB Code:
SQL = "INSERT INTO LogTable(Username,[Date],[Time],EditFields) VALUES('strUser','" & Date & "','" & Time & "','New Mailbox created');"
-
Aug 10th, 2005, 11:09 PM
#3
Thread Starter
Member
Re: sql syntax error
Brilliant dee-u!! it's working. By the way, as I had expected in my logtable username field it is storing "strUser" instead of my actual strUser which is a variable. How do I modify my syntax for the strUser variable?
Also, if you have time can you please explain why you put [Date] and [Time] in square brackets.. Thanks a lot
-
Aug 10th, 2005, 11:32 PM
#4
Re: sql syntax error
It is because Date and Time are Visual Basic functions.
VB Code:
SQL = "INSERT INTO LogTable(Username,[Date],[Time],EditFields) VALUES('" & strUser & "','" & Date & "','" & Time & "','New Mailbox created')
-
Aug 11th, 2005, 12:58 AM
#5
Thread Starter
Member
Re: sql syntax error
Thank you. All problem solved.
-
Aug 11th, 2005, 01:03 AM
#6
Re: sql syntax error
You could mark this thread as resolved now. Take a look at my sig on how to do it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|