Error while accessing MS ACCESS database via ASP

Hi.

I have a problem while accessing MS ACCESS database using ASP script (ADOBD class). Code looks sth. like that:

set rs_del = Server.CreateObject("ADODB.Recordset")
rs_del.MaxRecords=0
sql = "SELECT * FROM Users WHERE Index IN ("&rem_str&");"

rem_str consists numbers which has to be extracted from database. This string (sql) looks like that:

SELECT * FROM Users WHERE Index IN (5, 7, 8)

When I try to open record-set

rs_del.Open sql, con, 2, 3

I get an error message:

Microsoft JET Database Engine error '80040e10'

No value given for one or more required parameters.

What can be wrong



Answer this question

Error while accessing MS ACCESS database via ASP

  • globelin

    Beagging.... Don't beat me :(

    The table name was the table from enother project.....

    Now everything works fine.

    btw: it's wierd that there was no error in style "Table not found"

    Thanks a lot ! :)


  • becklighter

    Hi,

    You will get the above error in 3 circumstances

    1. Not enough parameters are passed to the query example your query could be SELECT * FROM USERS WHERE INDEX IN (5,7,8,)

    2. Your query contains a invalid column name

    3. Your query contains a incorrect sql delimeters.

    The best way to debug this is to display the SQL String on you ASP Page, You can then copy it and run the generated query in MS-Access directly and see if it is executing correctly.

    Regards

    Arvind T N


  • Error while accessing MS ACCESS database via ASP