[thelist] Inserting dates and booleans into MS Access

Tim Burgan email at timburgan.com
Wed Jan 19 05:56:25 CST 2005


Hello,


In my website, I'm trying to insert new rows into my table where the 
column data setup within MS Access is:
  text, text, text, date, text, boolean (true/false), boolean (true/false).

I get 'data type mismatch' errors, regarding trying to enter data in the 
DATE and BOOLEAN columns.

My dates from the form are in the format of: '20 Jan 2005'
Any my checkbox's naturally return true or false.

What do I need to change my data to in order to get it to successfully 
insert into the table?
I'm using PHP, and tried using mkdate() to create the date.. without 
success.

My SQL is:
"INSERT INTO tblStudents (name, username, password, expiry, permissions, 
website, displayUser) VALUES ('Joe Blow','joe','jblow345','20 Jan 
2005','student','true','true');

Using mkdate() I also tried:
"INSERT INTO tblStudents (name, username, password, expiry, permissions, 
website, displayUser) VALUES ('Joe 
Blow','joe','jblow345','1106061805','student','true','true');


Thanks for your time. Any help would be greatly appreciated.

Regards

Tim




More information about the thelist mailing list