Click to See Complete Forum and Search --> : Not sure if this belongs here....


rtatnell
04-25-2003, 04:29 PM
I'm using SQL to update my online database.
I'm trying to insert a new record into a table using the INSERT statement, however I'm having difficulty inserting a date into the date field for my record. The date is in Short Date form and I'm using SQL code just like the one below, could you please explain why it's not working. I get the error "Syntax error in Insert statement". Thanks

SQL
INSERT INTO tblinfo (string1,date) VALUES ('Hello','21/9/03')

rtatnell
04-26-2003, 02:00 PM
so why wont this work then?

INSERT INTO tblreview (gamename,author,summary,date,link,rating,type) VALUES ('GAMENAME','AUTHOR','review goes here',#26/4/03#,'titles/showprofile.asp?title=DIE','3.2','STA');

AdamGundry
04-26-2003, 03:39 PM
Shouldn't #26/4/03# be #4/26/03# instead?

Adam

rtatnell
04-26-2003, 03:45 PM
do i have to write the date american style, ie backwards then? So mm/dd/yy?

Thanks

rtatnell
04-26-2003, 03:56 PM
still doesnt do it

Nicodemas
04-28-2003, 07:44 AM
INSERT (gamename, author, summary, date, link, rating, type) INTO tblreview VALUES ('GAMENAME', 'AUTHOR', 'review goes here', #4/26/03#, 'titles/showprofile.asp?title=DIE', '3.2', 'STA');


Also, I thought that the word "Date" was a reserved word in Access. Try encapsulating it in braces. [Date]

rtatnell
04-28-2003, 09:42 AM
Thanks rob, that did it!
Been annoying me for ages and I tried everything mentioned in this forum. Thank god for people like you.
Thanks again!!