database error

Results 1 to 3 of 3

Thread: database error

  1. #1
    manoj Guest

    Default database error

    i tried running sql query on command prompt, it then executes the query.<BR>but from an asp file it gives the following error :<BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80040e10&#039 <BR>[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2. <BR><BR>my code contains this lines:<BR>sql = "SELECT Items.Id, Items.Itemnumber, AdditionDate, Status, Hips, Waist, Bust, Condition, Items.Name, items.era, eras.asp FROM Items, Eras WHERE (AdditionDate Between currendate And dateonly) and (Eras.Era = Items.Era)ORDER BY itemnumber, ordernumber; "<BR>&#039 set rs = conn.execute(sql) &#039 1<BR> sql,conn,3,3 &#039 2<BR>i tried both the options of executing rs object <BR>but still the results are same <BR>pl help me out<BR>thanx<BR><BR><BR><BR>

  2. #2
    kreddy Guest

    Default RE: database error

    Hai manoj,<BR> In the select statment u haven&#039t selected the field ordernumber and u have mentioned in the order by class. When we mention the filed name in the order by class, we have to select the field name in the select statement.I hope u might have forgotten to put the oredernumber in the select statement and also there is no need to put the ;(semicolon) after the end of the sqlstatement.And i didn&#039t understand what exactly u want to do in the following query if u can explain me what exactly u wanted to do then i can give a solution.<BR><BR> sql,conn,3,3 &#039 2 <BR><BR><BR>thanks<BR>kreddy

  3. #3
    manoj Guest

    Default RE: database error

    thanx for ur solution.<BR>but i have solved it..<BR>hope u remembered it db error was : expected 2<BR>actually, i was passing two values currentdate and dateonly<BR>for which the sql query was expecting values from database<BR>but it was to passed from asp with an " & currentdate & "<BR>and so.. along with date format ..<BR>and sql,conn,3,3 will open the query in (if i remember)<BR>forward mode only and with optimist locking ..<BR><BR>but thanx for ur co-op .<BR>i would like to know more about u (which company..)<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