ODBC Drivers error '80040e10'

Results 1 to 2 of 2

Thread: ODBC Drivers error '80040e10'

  1. #1
    Thedon Guest

    Default ODBC Drivers error '80040e10'

    Ok, I know this one has been talked about heaps but none of the previous responses have helped me. I must be blinded from looking at my own code too much!<BR><BR>Below are the codes and a definition of my problem...<BR><BR><BR>***CODE***<BR><BR>&#039;Decl are some variables <BR>dim strOrderNum, strDescription , strQuantity , strQuotedPrice , strSQLInsert<BR><BR><BR>&#039;Place the table values into the strings<BR>strOrderNum = 5 <BR>strDescription = Request.Form("description")<BR>strQuantity = Request.Form("quantity")<BR>strQuotedPrice = Request.Form("quoted_price")<BR><BR><BR>&#039;set up the DB connection and recordset<BR>Set objConn = Server.CreateObject("ADODB.Connection")<BR>set objRS = Server.CreateObject("ADODB.Recordset")<BR><BR><BR> &#039;Now open the conection<BR>objConn.Open "PO2001" <BR><BR><BR>&#039;Set up the SQL statement<BR>strSQLInsert = "INSERT INTO tblRequest (order_num, description, quantity, quoted_price) VALUES (" & strOrderNum & ", """ & strDescription & """, " & strQuantity & ", " & strQuotedPrice & ");"<BR><BR>response.write "&#060;P&#062;" & strSQLInsert & "&#060;/P&#062;"<BR>response.write "&#060;P&#062;Conn State = " & objConn.state & "&#060;/P&#062;"<BR><BR>&#039;execute the SQl. <BR>objRS.open strSQLInsert,objConn,adOpenKeySet,adLockPessimisti c,adCmdText<BR><BR>&#039;Close the database Recordset and connnection<BR>objConn.Close<BR>objRS.close<BR>Set objConn = Nothing<BR>set objRS = Nothing<BR>Set strDescription = Nothing<BR>Set strQuantity = Nothing<BR>Set strQuotedPrice = Nothing<BR><BR><BR>***OUTPUTS***<BR>1. The SQL queries work fine in access<BR>2. Conn state comes up as 1<BR><BR><BR>***NOTES***<BR>1. I can read perfectly fine from the database and even print it into a table on the same page (below this code)<BR>2. I cant add or delete records though???<BR>3. In this instance I just want it to add some purchase details that were just grabbed off a form on the page (the page then reloads and grabs the variables OK)<BR>4. Code at the top of the page is...<BR><BR>&#060;% @Language = "VBScript" %&#062;<BR><BR>&#060;% <BR><BR>Option Explicit<BR>Response.Buffer = true<BR>Response.Expires = -1441<BR><BR>%&#062;<BR><BR>&#060;!-- #include file="../common/adovbs.inc" --&#062; <BR><BR>***ERROR MESSAGE***<BR>Microsoft OLE DB Provider for ODBC Drivers error &#039;80040e10&#039; <BR><BR>[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1. <BR><BR>/po2001/content/request.asp, line 161 <BR><BR><BR>and this is line 161...<BR>objRS.open strSQLInsert,objConn,adOpenKeySet,adLockPessimisti c,adCmdText<BR><BR><BR>ANY HELP AT ALL IS MOST APPRECIATED!!!

  2. #2
    Join Date
    Dec 1969

    Default RE: ODBC Drivers error '80040e10'

    strSQLInsert = "INSERT INTO tblRequest (order_num, description, quantity, quoted_price) VALUES (" & strOrderNum & ", """ & strDescription & """, " & strQuantity & ", " & strQuotedPrice & ");" <BR><BR>ur error is in this statement. for strDescription, you have double quotes; replace with a tick (&#039;)<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts