>But my problem is not that I dont know a name of the property but an order of statements. Every time I am trying to set cursor type it says cannot because either something is open or something is closed.
>Mark
Here is a bit of code that will create an updateable cursor. It uses OLE DB rather than ODBC but the concept is the same. (SQL Server 7.0 Only)
This will run on an ASP Page
Set cn = Server.CreateObject("ADODB.Connection")
' Specify the OLE DB provider.
cn.Provider = "sqloledb"
' Specify connection string on Open method.
' To run the sample, edit this line to reflect your server's name.
ConnStr = "Server=Your_SQL_Server_Name;Database=Pubs;UID=sa;PWD=;"
cn.Open ConnStr
'Create a recordset
Set rs = Server.CreateObject("ADODB.Recordset")
'Create a query string that retrieves the information
querystr = "SELECT * FROM authors"
'Set all the properties for the recordset and then open it.
rs.ActiveConnection = cn
rs.CursorType = adOpenKeyset && 1
rs.LockType = adLockOptimistic && 3
rs.Source = querystr
rs.Open
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only