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 |
|
timmy
Master Smack Fu Yak Hacker
1242 Posts |
Posted - 2006-10-19 : 21:57:09
|
Hi all, I'm having an ongoing problem with DAO and VB6 (none of that new-fangled ADO/ADO.NET for us!!). We have a situation where:- we open a DAO recordset using a stored proc as a source- we loop throught said recordset and use it to populate a table in a separate database. - sometimes we need to read extra data from the first database using a stored proc and querydef object. When we run the Execute method of this querydef, the application locks up and starts chewing memory (Vb6.exe > 500MB in debug mode...)I have tried changing the method by which the first recordset was created and modified it's settings (snapshot type etc), but to no avail. The only way I can see to get around it is to create a separate DAO connection and use them in parallel (i.e. read the recordset on the 1st; read any other data required on the 2nd). The strange thing is that this problem only seems to manifest itself when the original recordset has a large number of records (200 in the example I've seen). So I don't know if it's a caching thing it has a problem with. NB: there are no transactions used for this. Does anyone have enough working knowledge of DAO to be able to suggest another possible solution? I've had a look at the DAO help files but it seems to be more targetted at Jet DB's.Any suggestions/condolences appreciated.... Cheers,Tim |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-10-20 : 05:57:58
|
| I suspect you are not reading the full recordset before trying to open the second - with small resultsets it is transfering the complete set so doesn't have the problem.Probably if you want to do this without completing the transfer you will need to use another connection.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|