By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,825 Members | 2,437 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,825 IT Pros & Developers. It's quick & easy.

syntax error in insert into

P: n/a
Can someone tell me what is the syntax error in the following line of
code?

db.Execute ("insert into data (timestamp) values (now())")

Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a

<ja**************@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Can someone tell me what is the syntax error in the following line of
code?

db.Execute ("insert into data (timestamp) values (now())")


Try this:
db.Execute ("insert into data (timestamp) values (#" & now() & "#)")

Nov 13 '05 #2

P: n/a
Doesn't seem to make a difference. Thanks though.

Nov 13 '05 #3

P: n/a
Di
db.Execute ("insert into data(timestamp1) values(#" & Now() & "#);")
works.

TimeStamp is a MS Jet DB Engine reserved word. It is probably reserved
in both upper and lower case (I think??), don't think you can use it as
a column name.

D...

Nov 13 '05 #4

P: n/a
"Di" <di************@bpb-na.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
db.Execute ("insert into data(timestamp1) values(#" & Now() & "#);")
works.

TimeStamp is a MS Jet DB Engine reserved word. It is probably reserved
in both upper and lower case (I think??), don't think you can use it as
a column name.

D...


Oops, D is right - timestamp is a reserved word. I missed that.
Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.