Too few Parameters. Expected 1. ???

Results 1 to 3 of 3

Thread: Too few Parameters. Expected 1. ???

  1. #1
    Join Date
    Dec 1969

    Default Too few Parameters. Expected 1. ???

    I keep getting this error in my page:<BR><BR> Too few Parameters. Expected 1.<BR><BR>What does this mean and how can I prevent it?<BR>Here is my code.<BR><BR>Set objConn = Server.CreateObject("ADODB.Connection")<BR>objConn .Open<BR><BR>Set objRS = Server.CreateObject("ADODB.Recordset")<BR>strSQL = "SELECT * FROM tblCompany WHERE fldUser = "&c_id<BR>objRS.Open strSQL, objConn<BR><BR>Any help is very much appreciated.<BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: Too few Parameters. Expected 1. ???

    This error usually means that you&#039ve misspelled the name of your table or one of the fields in your field list. That&#039s the first thing to check. Also, since I suspect that fldUser is a string, you need to use quotes around the value...<BR><BR>strSQL = "SELECT * FROM tblCompany WHERE fldUser = &#039" & c_id & "&#039"<BR>objRS.Open strSQL, objConn

  3. #3
    DavidM Guest

    Default Lots of reasons....

    Here is a list of reasons that would cause this:<BR><BR>1. You have misspelled a FIELD NAME<BR>2. The Value of "c_id" is not being passed<BR>3. There is a Syntax error in your variable statement<BR><BR>one of these 3 erros are very very common. I would check to make sure the Variable "c_id" is being passed. <BR><BR>Meaning before your "Set objConn = Server.CreateObject("ADODB.Connection")" statement type <BR><BR>Response.Write(c_id) You will still get your Expected 1 error but before that error you will see your variable written out. if it is there, then check for syntax errors. <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