annnkay
|
Posted: 01/24/2002, 11:23 AM |
|
i'm new in using the jsp.so i need help.i'm having this error
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.what have i got wrong?
|
|
|
Omaha
|
Posted: 01/24/2002, 11:58 AM |
|
You probably have a field with the wrong data type in your form or you could be submitting an invalid value for instance, a string where a numeric value is expected.
|
|
|
Teufel
|
Posted: 01/25/2002, 2:55 PM |
|
The problem is certainly the one described above: different type is trying to be input into the database.
So I ask further: how shall I be completely sure that the insert record is correct before insertion? I don't want to do the checks on the client side (Javascript), but on the server. One thing I've always used when coding by hand are regular expressions (there are some PHP snippets around). Does anybody know of some package that could be easily integrated into my CC application to fully validate type and format of my fields before insertion???
Thanxs
|
|
|
CodeCharge Support
|
Posted: 01/25/2002, 3:42 PM |
|
The field values submitted by a form are available in the Before Insert event in variables of the nature fld<FieldName> where <FieldName> is the name of the field. You could therefore check these values for correctness in this event. If you find a problem, you can set the s<FormName>Err variable to contain a message about the problem encountered. As long as s<FornName>Err is not empty, the insertion will not occur but instead the user will be shown the error text and given a chance to correct the problem.
|
|
|
annnkay
|
Posted: 01/26/2002, 7:48 AM |
|
thanx for your explaination.
|
|
|