Can anybody help me? We know Ado curspr are of 4 types -
Now I want to see the effect of different cursors from the same machine.I have created two instance of VB6 ,Connecting to the Sql Server 2000 database.Two form are open from two different projects,each having their own recordset and connection but they both are connected to the same database and same table.As if two different user are connected to the same table. Now My question is - "Is it possible to see the effect of different cursors through this mechanism?I have tried but failed?
Please tell me why I failed?And how could I see using dynamic cursor the newly added records?
I hope to hear from you guys.
'And how could I see using dynamic cursor the newly added records'
for your above quote
Refresh the Recordset using Recordset.Requery
close the Recordset using Recordset.Close
and then Open the Recordset using Open Method.
I know how to requery recordset.But is that clarify the qualities of Cursors? U can see the same effect if u requery keyset cursor Recordset....I mean u can see the newly added records.
But keyset cursor is defined as fixed no of records.My question is then how come we could get the qualities of cursors?
And what actually requery does?I think it runs the query again using the database.So if this happens then we are connecting the database again and again whenever we r using requery.So then what is the use of cursorS?
This is a somewhat involved topic. I would recommend that you locate a copy of Serious ADO: Universal Data Access with Visual Basic, by Rob Macdonald.
Macdonald spends about 10 pages in his book outlining the various combinations of cursorlocation and cursortypes. Remember, cursorlocation and cursortype are interdependent properties of ADO. It's a good idea to always explicitly define the cursorlocation you are using.
So, my first question would be... What is the cursorlocation you've specified for your test? If you define adUseClient, the cursortype is ALWAYS set to static, even if you request a different type. And all the results of a query are moved from the server to the client in a client-side cursor, resulting in possible performance issues on a memory constrained client, or on a network bottlenecked system.
The other issue is that client-side cursors (and their forced static recordsets,) since they make a local copy of the records, inherently separate the client from the database. Changes made in a table cannot be seen by the client until the client refreshes the data set.
Last edited by loquin; 01-11-06 at 14:32.
"Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
"I have my standards. They may be low, but I have them!" - Bette Middler
"It's a book about a Spanish guy named Manual. You should read it." - Dilbert