access_asp thread: Error while inserting data into database
Message #1 by joyce@j... on Fri, 7 Mar 2003 15:12:16
|
|
Hi,
I am getting this error when I am trying to insert data into my database.
Have read articles at adopenstatic.com but not sure where to start, please
advice.
Microsoft JET Database Engine error '80040e07'
Data type mismatch in criteria expression.
/ASP/paypalIPN.asp, line 89
Here is the relevant code(Line 89 is marked with stars below):
dim connection
dim strSQL,sConnString
strSQL="INSERT INTO Sold (PaymentStatus,
SoldDate,
PayerPapalStatus,
FirstName,
LastName,
Address,
City,
State,
Zip,
Country,
AddressStatus,
Email,
ProductID,
Description,
PaymentType,
SoldPrice) VALUES
('" & payment_status & "',
'" & payment_date & "',
'" & payer_status & "',
'" & first_Name & "',
'" & last_Name & "',
'" & address_street & "',
'" & address_city & "',
'" & address_state & "',
'" & address_zip & "',
'" & address_country & "',
'" & address_status & "',
'" & payer_email & "',
'" & item_Number & "',
'" & item_Name & "',
'" & payment_type & "',
'" & payment_gross & "')"
'create an ADO connection object
Set connection = Server.CreateObject("ADODB.Connection")
'Open the connection to the database
connection.Open(sConnString)
***************THIS IS LINE 89, THE LINE WITH ERROR*****************
'execute the SQL
connection.execute(strSQL)
Please advice, thanks in advance!
Message #2 by "Zee Computer Consulting" <zee@t...> on Fri, 7 Mar 2003 12:42:50 -0800
|
|
If any of those fields are of type numeric, remove the single quotes -- you
are trying to save a string to a numeric variable, which is a "data type
mismatch."
-- Zee
----- Original Message -----
From: <joyce@j...>
To: "Access ASP" <access_asp@p...>
Sent: Friday, March 07, 2003 3:12 PM
Subject: [access_asp] Error while inserting data into database
> Hi,
>
> I am getting this error when I am trying to insert data into my database.
> Have read articles at adopenstatic.com but not sure where to start, please
> advice.
>
> Microsoft JET Database Engine error '80040e07'
>
> Data type mismatch in criteria expression.
>
> /ASP/paypalIPN.asp, line 89
>
>
> Here is the relevant code(Line 89 is marked with stars below):
>
>
> dim connection
> dim strSQL,sConnString
>
> strSQL="INSERT INTO Sold (PaymentStatus,
> SoldDate,
> PayerPapalStatus,
> FirstName,
> LastName,
> Address,
> City,
> State,
> Zip,
> Country,
> AddressStatus,
> Email,
> ProductID,
> Description,
> PaymentType,
> SoldPrice) VALUES
> ('" & payment_status & "',
> '" & payment_date & "',
> '" & payer_status & "',
> '" & first_Name & "',
> '" & last_Name & "',
> '" & address_street & "',
> '" & address_city & "',
> '" & address_state & "',
> '" & address_zip & "',
> '" & address_country & "',
> '" & address_status & "',
> '" & payer_email & "',
> '" & item_Number & "',
> '" & item_Name & "',
> '" & payment_type & "',
> '" & payment_gross & "')"
>
>
> 'create an ADO connection object
> Set connection = Server.CreateObject("ADODB.Connection")
>
>
> 'Open the connection to the database
> connection.Open(sConnString)
>
> ***************THIS IS LINE 89, THE LINE WITH ERROR*****************
> 'execute the SQL
> connection.execute(strSQL)
>
>
>
> Please advice, thanks in advance!
>
>
Message #3 by "Ken Schaefer" <ken@a...> on Mon, 10 Mar 2003 13:25:12 +1100
|
|
www.adopenstatic.com/faq/80040e07.asp
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <joyce@j...>
Subject: [access_asp] Error while inserting data into database
: I am getting this error when I am trying to insert data into my database.
: Have read articles at adopenstatic.com but not sure where to start, please
: advice.
:
: Microsoft JET Database Engine error '80040e07'
:
: Data type mismatch in criteria expression.
:
: /ASP/paypalIPN.asp, line 89
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|