Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

'80040e14' I count the same number 2

Status
Not open for further replies.

dburnham

Programmer
Oct 18, 2001
118
US
The line 21 is my execute sql line.

I am not sure what this is looking for. I have the same fields in my query that are in my DB. Below you will find my error message.


Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Number of query values and destination fields are not the same.

/submission_form_test.asp, line 121
 
OK, I have read in several places what this error message means. However, I do not know how to fix it.

I will post the code below. Can some one please smack me upside my head when they see what I have missed. I will only post what I believe to be the problem code.


mySQL= "INSERT INTO InvoiceTable "
mySQL= mySQL & "(ID,invoicenumber,invoicepicture,Password,invoicelocation,amount,paypal_shipping_currency,description,paypal_url,paypal_price,company,paypal_item,paid)"
mySQL= mySQL & "VALUES ('"& Request.Form("ID")
mySQL= mySQL & "," & Request.Form("invoicenumber")
mySQL= mySQL & "," & Request.Form("invoicepicture")
mySQL= mySQL & "," & Request.Form("Password")
mySQL= mySQL & "," & Request.Form("invoicelocation")
mySQL= mySQL & "," & Request.Form("amount")
mySQL= mySQL & "," & Request.Form("paypal_shipping_currency")
mySQL= mySQL & "," & Request.Form("description")
mySQL= mySQL & "," & Request.Form("paypal_url")
mySQL= mySQL & "," & Request.Form("paypal_price")
mySQL= mySQL & "," & Request.Form("company")
mySQL= mySQL & "," & Request.Form("paypal_item")
mySQL= mySQL & "," & Request.Form("paid") & "')"

myConnection.Execute mySQL
 
Hello dburnham,

Do this?

mySQL= mySQL & "(ID,invoicenumber,invoicepicture,[Password],invoicelocation,...etc

regards - tsuji
 
You are missing your parentheses for your inserted values. It reads everything between the first and last parentheses as only one value that you are attempting to insert into 13 database fields. Change it like so (the corrected parentheses are in red):
Code:
mySQL= "INSERT INTO InvoiceTable "
       mySQL= mySQL & "(ID, invoicenumber, invoicepicture, Password, invoicelocation, amount, paypal_shipping_currency, description, paypal_url, paypal_price, company, paypal_item, paid)"
            mySQL= mySQL & "VALUES ('"& Request.Form("ID")
            mySQL= mySQL & "[COLOR=red]'[/color],[COLOR=red]'[/color]" & Request.Form("invoicenumber")
            mySQL= mySQL & "[COLOR=red]'[/color],[COLOR=red]'[/color]" & Request.Form("invoicepicture")
            mySQL= mySQL & "[COLOR=red]'[/color],[COLOR=red]'[/color]" & Request.Form("Password")
            mySQL= mySQL & "[COLOR=red]'[/color],[COLOR=red]'[/color]" & Request.Form("invoicelocation")
            mySQL= mySQL & "[COLOR=red]'[/color],[COLOR=red]'[/color]" & Request.Form("amount")
            mySQL= mySQL & "[COLOR=red]'[/color],[COLOR=red]'[/color]" & Request.Form("paypal_shipping_currency")
            mySQL= mySQL & "[COLOR=red]'[/color],[COLOR=red]'[/color]" & Request.Form("description")
            mySQL= mySQL & "[COLOR=red]'[/color],[COLOR=red]'[/color]" & Request.Form("paypal_url")
            mySQL= mySQL & "[COLOR=red]'[/color],[COLOR=red]'[/color]" & Request.Form("paypal_price")
            mySQL= mySQL & "[COLOR=red]'[/color],[COLOR=red]'[/color]" & Request.Form("company")
            mySQL= mySQL & "[COLOR=red]'[/color],[COLOR=red]'[/color]" & Request.Form("paypal_item")
            mySQL= mySQL & "[COLOR=red]'[/color],[COLOR=red]'[/color]" & Request.Form("paid") & "')"


-----------------------------------------------------------------------------------------------------
"If you can't explain something to a six-year-old, you really don't understand it yourself."
-- Albert Einstein
 
Thank you both as I had to make both adjustment to make the code work.

David
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top