|
Hi Guys, I'm very new to ASP and am having a annoying problem. Can anyone help.
Why isn't this working?
The DSN is correct and there is a table in my Db called 'april'.
<%
dim str_month
str_month = "april"
set oRSt=Server.CreateObject ("ADODB.recordset")
sqltext="SELECT * FROM '%" & str_month & "%' WHERE ID=2"
oRSt.open sqltext, "DSN=nt5792-calendar"
%>
getting an error of:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Syntax error in query. Incomplete query clause.
/bcintra/pages/calendar/searchc.asp, line 20
Thanks in advance.
|