|
 |
asp_databases thread: Something about SQL server....
Message #1 by "Vikas Sethi" <emailtovikas@r...> on Tue, 27 Feb 2001 11:57:23
|
|
While opening a Recordset I set the CursorType property to adOpenKeyset.
When I run the application in VB, I get the value of the cursor type
property in a label. It is displaying value "3" for both Static and Keyset
Cursors type.
My Question is that whether SQL server 7.0 supports Keyset cursors ?? If
yes then why is the value 3 being displayed for Keyset cursors ??
Thanks?
Message #2 by "Ken Schaefer" <ken@a...> on Wed, 28 Feb 2001 10:47:55 +1100
|
|
If you use OLEDB, and attempt to get an updateable recordset, you will get a
keyset cursor instead, because the static cursor is not updateable.
Cheers
Ken
----- Original Message -----
From: "Vikas Sethi" <emailtovikas@r...>
To: "ASP Databases" <asp_databases@p...>
Sent: Wednesday, February 28, 2001 7:28 AM
Subject: [asp_databases] Something about SQL server....
> While opening a Recordset I set the CursorType property to adOpenKeyset.
> When I run the application in VB, I get the value of the cursor type
> property in a label. It is displaying value "3" for both Static and Keyset
> Cursors type.
> My Question is that whether SQL server 7.0 supports Keyset cursors ?? If
> yes then why is the value 3 being displayed for Keyset cursors ??
>
> Thanks?
Message #3 by "Vikas Sethi" <emailtovikas@r...> on Wed, 28 Feb 2001 17:58:40
|
|
Ken,
I still didn't get it....This is my code...
Dim cn As ADODB.Connection
Dim rsGetData As ADODB.Recordset
Private Sub Form_Load()
Set cn = New ADODB.Connection
Set rsGetData = New ADODB.Recordset
cn.ConnectionString = "Provider=SQLOLEDB;User
ID=Sa;Database=dbShares;Data Source=raghu"
cn.Open
rsGetData.Open "Select * from tblCompanyDetails", cn, adOpenKeyset
lblRecordset = rsGetData.CursorType
lblLock = rsGetData.LockType
End Sub
If I am specifying adOpenKeyset in the CursorType argument I should get
the CursorType value=1 in lblRecordset and if I specify adOpenStatic I
should get value=3.
Thanks....
|
|
 |