ADO related question
-
Friends, We use ADO with VC++ in order to deal with database servers. My question is related to recordset object. When we execute certain query of
select
statement, the recoredset object contains the resultant records. Now please tell me where these records are actually present by default whether client side or server side ?? What happens when we fetch next record from recordset object? I want all records to be present on my client machine so that when i fetch records, there'll be no need to consult back server...how can i do so ??? -
Friends, We use ADO with VC++ in order to deal with database servers. My question is related to recordset object. When we execute certain query of
select
statement, the recoredset object contains the resultant records. Now please tell me where these records are actually present by default whether client side or server side ?? What happens when we fetch next record from recordset object? I want all records to be present on my client machine so that when i fetch records, there'll be no need to consult back server...how can i do so ???It depends. In ADO, you can set the cursor location to be server side or client side cursors. To force a recordset to be client side, do the following before you open the table/select statement etc. Note, this is VB code for swiftness. rs.CursorLocation = adUseClient For server side - adUseServer
Shameless Plug - Distributed Database Transactions in .NET using COM+
-
Friends, We use ADO with VC++ in order to deal with database servers. My question is related to recordset object. When we execute certain query of
select
statement, the recoredset object contains the resultant records. Now please tell me where these records are actually present by default whether client side or server side ?? What happens when we fetch next record from recordset object? I want all records to be present on my client machine so that when i fetch records, there'll be no need to consult back server...how can i do so ???By default, the recordset objects are present on the server side. When you fetch a record from the recordset object, the data are got from the server via the network. You can let them be present on the client compute by changing the CursorLocation property of the recordset object. In VC++: _RecordsetPtr pRs; pRs.CreateInstance(__uuidof(Recordset)); pRs->CursorLocation = ADOCG::adUseClient; //set the cursor to be client side pRs->CursorLocation = ADOCG::adUseServer; //server side, the default Hi guys. I'm a very fat man. Do you like fat men?