pixelRONIN
Technical User
I would like to filter an Access DB which has a table named "events" by a column named "category". Within the column, I have five "event" catagories in which I would like to filter the Event table by.
Here I have opened the DB:
dsn="DBQ=" & Server.Mappath("admin/o12cal.mdb" & ";Driver={Microsoft Access Driver (*.mdb)};"
Set Conn = Server.CreateObject("ADODB.Connection"
Conn.Open dsn
Here is my attempt to filter the Events:
<%Set RSDATE = Server.CreateObject("ADODB.Recordset"
SQLDATE = "SELECT * FROM Events WHERE Category = dance AND (Month(Date) = Month('"&dateSelect&"')) AND (Year(Date) = Year('"&dateSelect&"')) AND (Day(Date) = Day('"&dateSelect&"'))"
RSDATE.Open SQLDATE, Conn, 1, 3
That statement brings up an ASP error:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
Any suggestions?
Thanks
pr
Here I have opened the DB:
dsn="DBQ=" & Server.Mappath("admin/o12cal.mdb" & ";Driver={Microsoft Access Driver (*.mdb)};"
Set Conn = Server.CreateObject("ADODB.Connection"
Conn.Open dsn
Here is my attempt to filter the Events:
<%Set RSDATE = Server.CreateObject("ADODB.Recordset"
SQLDATE = "SELECT * FROM Events WHERE Category = dance AND (Month(Date) = Month('"&dateSelect&"')) AND (Year(Date) = Year('"&dateSelect&"')) AND (Day(Date) = Day('"&dateSelect&"'))"
RSDATE.Open SQLDATE, Conn, 1, 3
That statement brings up an ASP error:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
Any suggestions?
Thanks
pr