Too few parameters? help me !

Results 1 to 7 of 7

Thread: Too few parameters? help me !

  1. #1
    Felipe R. Mahalem Guest

    Default Too few parameters? help me !

    in the line :<BR><BR>objRS.Open strSQL, objConn<BR><BR>Is giving the 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><BR>why ?? Here is the full code :<BR>&#060;%<BR>Dim objConn<BR>Set objConn = Server.CreateObject("ADODB.Connection")<BR>objConn .ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=e:homeairwalkdados est.mdb"<BR>objConn.Open <BR>%&#062;<BR><BR>&#060;%<BR>Dim objRS, variable1, variable2, variable3<BR>Set objRS = Server.CreateObject("ADODB.Recordset") <BR><BR>Dim strSQL<BR>strSQL = "SELECT nome, pontos, insetos FROM recordes WHERE code = 10" <BR>objRS.Open strSQL, objConn<BR><BR>Set variable1 = objRS("nome")<BR>Set variable2 = objRS("pontos")<BR>Set variable3 = objRS("insetos")<BR><BR>objRS.Close<BR>Set objRS = Nothing<BR>objConn.Close<BR>Set objConn = Nothing <BR>%&#062;<BR><BR>&#060;%= variable1 %&#062;<BR><BR>&#060;%= variable2 %&#062;<BR><BR>&#060;%= variable3 %&#062;<BR><BR><BR><BR>tnkx!

  2. #2
    Join Date
    Dec 1969

    Default RE: Too few parameters? help me !

    Is Code a text or numeric field? If it&#039s a text field then you need to embed single quotes around your parameter. Another reason I&#039ve gotten that message is a typo in the select field names.<BR><BR>--bob<BR><BR>

  3. #3
    Felipe R. Mahalem Guest

    Default RE: Too few parameters? help me !

    Yes, code is a numeric field... what i need to do ??

  4. #4
    hu kearz Guest

    Default Maybe try this manner of execution

    Set objRS = objConn.Execute(strSQL)<BR>instead of<BR>objRS.Open strSQL, objConn<BR><BR>I don&#039t know if it&#039ll make a difference; based on the information you presented, I doubt it. But it can&#039t hurt!<BR><BR>Good Luck

  5. #5
    Brad Kingsley Guest

    Default RE: Too few parameters? help me !

    Run that SQL statement outside of ASP and check the results. I would guess that either a field name is mispelled or perhaps one of the field names conflicts with a reserved word.<BR><BR>-Brad Kingsley, MCP - NT, IIS4<BR>Reliable Windows NT Web Hosting<BR>ORCS Web, Inc -

  6. #6
    Ben Timby Guest

    Default RE: Too few parameters? help me !

    I would be a field name or table name is spelled differently in the script than in the DB.

  7. #7
    Pankaj Gupta Guest

    Default RE: Too few parameters? help me !

    The parameter names in your Sql query might be using some of the keywords/reservewords of sql.For example some of the reserve words of sql which we normally use as the field names of our tables are resume,transactions,expire etc.<BR><BR>--Pankaj Gupta,MCSD.<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