Click to See Complete Forum and Search --> : A real challenge (asp.net)


PeOfEo
04-11-2003, 11:28 AM
I have been trying to update a date in a data base when a user enters a site using today(). Well ribeyed and eye were working on getting this to work but it will not, my sql statement is fine without the date feild, but when I try to update a date it gives me a syntax error. Anyone have a theory or a good source code I can look at to figure this out?

MikeOS
04-12-2003, 08:30 AM
What type of database are you using? Databases handle dates differently, for instance SQL Server wants dates enclosed in single quotes, but Access wants dates enclosed in hash (#) symbols. You should check the documentation of the DBMS you're using to see how your particular DBMS handles dates. That's the best I can offer you without seeing your code and knowing which DBMS you're using.

PeOfEo
04-12-2003, 04:01 PM
well right now I am using an access mdb but I will probably move to an sql data base in a little while when I get motivated to transfer all the data. So I should put it in the # #
what should be put inbetween the ## I am using a today() to get the current system date. I am saying label1.text = today() then I am doing in my sql statement replace label1.text bla bla bla, and that feild in the data base I have tested it as a date feild and as a text feild, show me part of an sql statement so I can see what you mean.

PeOfEo
04-12-2003, 04:04 PM
I am using asp.net not asp by the way...