Ask a Question related to ASP Database, Design and Development.
-
mxstu #21
Re: Insert Error
Dan Bracuk,
We're not talking about an OLE connection here. The OP's code and error messages on this and their other thread indicate they are using ODBC.
mxstu Guest
-
Need Help with Record Insert Error
Hi Coldfuschions, I am a novice and am trying to use the Record Insertion Form Wizard in D8/ColdFusion to add a record to a MS Access database. ... -
SQL Insert Error
Any ideas on why the below doesn't work? I keep getting this error message????? ---> "Object must implement IConvertible". Private Sub... -
ERROR: Please insert CD-ROM
Why does the program keep asking me to insert the CD? I thought I downloaded it to my harddrive but now acts like it won't work unless, I keep the... -
Insert error :: must be updateable?
I am picking up the following error message which is strange as it has only started happening since I have transferred servers: Microsoft JET... -
asp insert error
hi, I made a asp form to insert product in a db. on my localhost everything works just fine. But online i got the : Microsoft OLE DB Provider... -
Abdlah #22
Re: Insert Error
The data types are as follows:
User_id = text
First_name = text
Middle_name = text
Last_name = text
Gender = Yes/No
Occupation = text
DOB = Date/time
Cnsmr_Password = text
Cnsmr_PasswordHint = text
Date_created = Date/time
I see you mention that my Gender field may be yes/no and not text. Why won't
access (coldfusion) accept yes/no? TIA
Abdlah Guest
-
mxstu #23
Re: Insert Error
It will accept it, but when you put single quotes around the value, it will be
treated as "text" and not boolean (yes/no , true/false). So use something like
VALUES ( ....., #YesNoFormat(Form.gender)#, .... )
Although I think you can also use 0/1 or true/false (without single quotes).
mxstu Guest
-
Abdlah #24
Re: Insert Error
Yes that gender definition as yes/no was the problem. So a big thanks. But, I am wondering why yes/not is not acceptable since this is what is being submitted? Thanks again:D
Abdlah Guest
-
mxstu #25
Re: Insert Error
You're welcome.
It is acceptible. You just needed to remove the single quotes. Single quotes
cause the access db engine to see the values as "text" and not boolean. Since
inserting a "TEXT" value into a "YES/NO" column is not allowed, the db engine
throws a data type mismatch error.
So use:
INSERT INTO yourTable (yourYesNoColumn) VALUES (YES )
.. and do not use ...
INSERT INTO yourTable (yourYesNoColumn) VALUES ('YES' ) <--- Note the single
quotes
mxstu Guest



Reply With Quote

