Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
sqlmom
Starting Member
5 Posts |
Posted - 2003-06-05 : 12:37:17
|
| (accidently posted this in wrong forum, sorry)I'm learning to create and use disconnected recordsets with ADO in VB6 and see how nifty it is, but I want to understand the implications and possible drawbacks. Can anyone answer these questions?1) If I only want to use the data in the recset, but not change it, is there a preferred way to get it (and still be disconnected)?2) Must you always use: adUseClient, adOpenForwardOnly, adLockBatchOptimistic? 3) If you use adUseClient, adOpenForwardOnly, adLockBatchOptimistic, and you don't update the recordset, is that bad?Now those were all pretty much the same question, but how about this:4) I have a disconnected recset which is the result of a join from 2 tables. I want to add a record to the recset but only want to effect 1 table. Is there a way either via ADO or by way of sql table/column config?Thanks anyone out there who can help. |
|
|
chadmat
The Chadinator
1974 Posts |
|
|
mohdowais
Sheikh of Yak Knowledge
1456 Posts |
|
|
MichaelP
Jedi Yak
2489 Posts |
Posted - 2003-06-05 : 12:54:45
|
I think this is the prefered way of doing disconected recordsets: With Rs .CursorLocation = adUseClient .CursorType = adOpenStatic .LockType = adLockReadOnly End Withrs.Open AdoCommandObjectrs.Activeconnection = nothing'something like that As far as updating, do not do RS.Update. With a disconnected recordset, I'm pretty sure you can't. Whenever you want to insert / update the recordset, use a stored proc to put the data into the database. I believe that you can "add" the record to the disconnected recordset as well, but do not use the RS to do the update.Michael<Yoda>Use the Search page you must. Find the answer you will.</Yoda> |
 |
|
|
Doug G
Constraint Violating Yak Guru
331 Posts |
|
|
|
|
|
|
|