|
Hostek, my ISP, has mySQL available. I had always used Access just because it was easy enough. I asked them to create a mySQL database for me, which they did in minutes, and I decided to test it out with my 404 page which logs 404 errors. My 404 page displays the home page and logs errors to Access. It also emails me an error. I decided to create the 1st mySQL table as a duplicate of the 404 Access table and write the same record to it. Connecting to the table from ASP was easy since my ISP gave me the sample connection string. Getting the SQL valid was the next hurdle. Seems you need to us the ` character and not the ' character when referencing table names and column names. Once that was done, the SQL was syntactically correct, but not doing exactly what I wanted. The date wasn't properly populating. Seems the date needs to be in the format: yyyy-mm-dd hh:mm:ss So, using ASP code I got the date in the proper mySQL date format and viola - success. Here's the code snippet to format the current date/time properly, in ASP, for a mySQL datetime field: mysql_date = DatePart("yyyy", now()) & "-" & DatePart("m", now()) & "-" & DatePart("d", now()) |