I have been searching for answers to the "data type mismatch" error I get but none answered my specific problem, when I created this asp file. Please take a look at my code snippet: 'insert new member into database msql="INSERT into Personals (login,gender,eyecolor,haircolor,birth_date,"&_ "height,smoker,haschildren,personality, "&_ "interests,mypassword,myemail,lastupdated)"&_ "VALUES('"&a_login&"','"&a_gender&"','"&a_eyecolor&"','"&a_haircolor&"','"&a_birth_date&"'," &_ ""&a_height&",'"&a_smoker&"','"&a_haschildren&"','"&a_personality&"',"&_ "'"&a_interests&"','"&a_password&"','"&a_email&"','"&date()&"')" Response.Write (msql) ------>>>LINE 101 Error Set rs=ConDB.Execute(msql) 'Close Connection ConDB.Close Set ConDB=Nothing Set rs=Nothing ----I have declared all the variables in another asp file called connection.asp--- ---My Access database contains these info: ID-Autonumber Login-Text Gender-Text Birth_Date-Date/Time EyeColor-Text HairColor-Text Height-Number Smoker-Text HasChildren-Text Personality-Text Interests-Text LastUpdated-Date/Time MyPassword-Text MyEmail-Text Paid-Number ----Now I dont know why I am getting this error: Error Type: Microsoft JET Database Engine (0x80040E07) Data type mismatch in criteria expression. /myweb/create_profile.asp, line 101 Any help will be appreciated.
Hi Use Response.end after this statement Response.Write (msql) Maybe the variables are not picking up the values from the form. Just check whether it is picking up all the values or not.
try to check the birth part of the users input. since it is a string value, u need to convert to date/time value for the database to understand.