Hello Everyone,
The Wrox 'ASP Databases' book has lots of examples showing you don't have
to use 'Set objConn' to the database. It shows creating a recordset
object using 'Set oRS' and then doing 'oRS.open' for the table in the
database.
I've had someone telling me I can't use 'Set oRS' for a whole table in a
database and that I must do a 'Set objConn' and a 'Set oRS.open'.
My connection is for a sybase 11 database that has a table named 'project'
in it. Does this code only work for an access .mdb database?
Here's the code and error. Can someone please tell me why it won't work.
I keyed it based on the book examples.
Thanks, Kat
<% @language=vbscript %>
<% Option Explicit %>
<%
dim oRSp
Set oRSp = Server.CreateObject("ADODB.recordset")
oRSp.open "project", "DSN=dbAcct;uid=xxx;pwd=xx"
oRSp.MoveFirst
Response.Write "This is the first project:<BR>"
Response.Write oRSp("proj_no").Value
%>
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[INTERSOLV][ODBC SQL Server driver][SQL Server]The request for
procedure 'project' failed because 'project' is a table object.