Error message in recordset creation?

Results 1 to 2 of 2

Thread: Error message in recordset creation?

  1. #1
    Dan Pollitt Guest

    Default Error message in recordset creation?

    From the following code:<BR><BR>Function ChkString(string)<BR> if string = "" then string = " "<BR> ChkString = Replace(string, "&#039", "&#039&#039")<BR> End Function<BR><BR>Dim OnDetails<BR>set my_conn= Server.CreateObject("ADODB.Connection")<BR>my_Conn .Open ConnString2<BR><BR>someSql = "SELECT * FROM details WHERE lastName = " & ChkString(Request.Form("surname"))<BR>&#039Respons e.Write(someSql)<BR>Set OnDetails = my_Conn.Execute(someSql)<BR><BR>I get this error:<BR><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>/members/bynameproc.asp, line 16 <BR><BR><BR>Can anyone point me in the right direction?<BR>ASP newbie by the way<BR><BR>Cheers<BR>Dan

  2. #2
    Join Date
    Dec 1969

    Default RE: Error message in recordset creation?

    try response.write-ing the variable &#039someSQL&#039 before the execute() call - that&#039ll be the root of your problem here<BR><BR>j

Posting Permissions

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