DB Provider for ODBC Drivers error ' 80040e10&

Results 1 to 2 of 2

Thread: DB Provider for ODBC Drivers error ' 80040e10&

  1. #1
    Join Date
    Dec 1969
    Posts
    745

    Default DB Provider for ODBC Drivers error ' 80040e10&

    I USE THE FOLLOWING SCRIPT AND GET THE ERROR BELOW.<BR>&#060;%=Session("Email2")%&#062;<BR><BR> &#060;%<BR>e1=Session("Email2")<BR>&#039script to retrieve<BR>&#039This creates a server object<BR>Dim Connect, myDSN, OnMenu<BR>Set Connect = Server.CreateObject("ADODB.Connection")<BR>myDSN=" FILEDSN=chrProfiles.dsn"<BR>Connect.Open myDSN<BR>Set OnMenu=Connect.Execute("SELECT * FROM chrProfiles1 WHERE Email=e1")<BR>%&#062;<BR><BR>ERROR MESSAGE<BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80040e10&#039 <BR><BR>[Microsoft][ODBC Microsoft Access 97 Driver] Too few parameters. Expected 1. <BR><BR>/Profiles/update.asp, line 22 <BR>THE ERROR HAS SOMETHING TO DO WITH THIS LINE ? <BR>Set OnMenu=Connect.Execute("SELECT * FROM chrProfiles1 WHERE Email=e1")<BR>Can someone tell me how I can get the session value into the SQL Statement?

  2. #2
    Jose Luis Guest

    Default RE: DB Provider for ODBC Drivers error ' 80040

    I think the problem is easy to solve. You are right wandering how can you get the session value into the SQL statement because the solution is right there. You are using a variable as a string and so you can not get the value of the variable. This is the correct statement:<BR><BR>Set OnMenu=Connect.Execute("SELECT * FROM chrProfiles1 WHERE Email=" & e1)<BR><BR>Jose Luis Puertas<BR>puertas@iname.com<BR>web developer<BR>ICOSIS S.L.<BR>Seville (Spain)

Posting Permissions

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