Data Type Errors when converting an empty field to a number 
Author Message
 Data Type Errors when converting an empty field to a number

I have created a form on a web page that asks for both numbers and text.  I
have a convert statement within the insert statement so that I will not get
an error when it is passed to the database.  However, if the user leaves the
number field blank on the form I get a data type error.  I can just
initialize the values to 0 on the form, but there are so many fields that it
is cluttered.  So does anyone know how to convert an empty field (which is
an integer field) into an Access Database?  I am using VBScript
Thanks for any help,
Sherri McWilliams


Tue, 24 Sep 2002 03:00:00 GMT
 Data Type Errors when converting an empty field to a number

CINT("0"& Fld.Text)?

Sheldon


Quote:
> I have created a form on a web page that asks for both numbers and text.
I
> have a convert statement within the insert statement so that I will not
get
> an error when it is passed to the database.  However, if the user leaves
the
> number field blank on the form I get a data type error.  I can just
> initialize the values to 0 on the form, but there are so many fields that
it
> is cluttered.  So does anyone know how to convert an empty field (which is
> an integer field) into an Access Database?  I am using VBScript
> Thanks for any help,
> Sherri McWilliams



Tue, 24 Sep 2002 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Problems with data type (number converted to char)

2. error converting data type (data browser based on stored procedure)

3. Converting OLEDB data types to VC++ data types

4. Error : Error converting data type varchar to real.

5. Using / converting LONG data type field

6. Data type for Phone Number field

7. Syntax error converting the varchar value to a column of data type int

8. Error converting data type DBTYPE_DBTIMESTAMP to datetime.

9. error converting data type in output from a stored procedure

10. Urgent: Error converting data type varchar to float

11. user defined function - error converting data type when used in a view

12. Arithmetic overflow error converting numeric to data type numeric


 
Powered by phpBB® Forum Software