Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Batch updating in ADO
Message
 
 
À
14/12/2001 01:04:00
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00594186
Message ID:
00595732
Vues:
22
Thanks JC. Actually, I though about this little more and is thinking about running the code in the server dll instead.

However, this poses a new problem: If I have a server component process this long running process how do I code it so that the client app know what the server component is doing - basically a status/progress update and/or notification that the process is complete?.

I find that using the normal Dim WithEvents statement on the client doesn't
work. Am I doing something wrong or can it be done at all?


>Something like this should work, just make sure that the recordset to be populated is obtained from the original table with something like "Select * From myTable Where 1=0". This assures that you have all of the table info for the batch update. Although I don't believe you can do a keyset type cursor here. I have used static cursors for batch updating and they work fine.
>
>So your code above could change as follows:
>
Set rsLGO = New Recordset
>With rsLGO
>   .CursorLocation = adUseClient
>   .LockType = adLockBatchOptimistic
>   .CursorType = adOpenStatic
>   .Open myConnection, "Select * From myTable Where 1=0"
>End With
>After adding rows the UpdateBatch method should work as advertised. HTH
It's "my" world. You're just living in it.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform