Hi all,
I'm tinkering with MySQL using Chilisoft ASP for the first time. My CREATE TABLE line looked like this:
That was fine. Now, whenever I try and insert into that table using the following code I get a syntax error in my SQL string:Code:CREATE TABLE t_blog (f_id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (f_id), f_name CHAR, f_message TEXT, f_date DATE, f_time TIME)
I figure that I don't need to mention the f_id field in this string cos it's auto numbering. Am I right? I'm starting to get a sneaking suspicion that I set up my table wrong ....Code:INSERT INTO t_blog (f_name, f_message, f_date, f_time) VALUES ('" & Request.Form("name") & "', '" & Request.Form("message") & "', #" & Date & "#, #" & Time & "#)
One other thing. When I write the SQL string back to the screen it looks like this:
Note the spaces around the time. Could this be screwing things up?Code:INSERT INTO t_blog (f_name, f_message, f_date, f_time) VALUES ('Greg Harvey', 'Test blog entry.', #04/09/02#, # 8:31:26 #)
G








Bookmarks