Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / May 2005



Tip: Looking for answers? Try searching our database.

recordset connection

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
smk23 - 24 May 2005 01:08 GMT
I created a function whose only job is to open a recordset, passing various
parameters to it that it might need to know. The idea was to then pass that
recordset back to whatever code needed it. I'm running into issues with open
connections. I can't close the connection because I want the recordset to use
somewhere else. THen in the calling function, I run into issues closing the
connection because it doesn't know what connection I'm talking about, etc. Is
this whole thing a bad idea? It just seemed more efficient to do it this way
but maybe not.
Signature

sam

Val Mazur (MVP) - 24 May 2005 01:39 GMT
Hi,

You cannot close connection because your recordset is opened against it. To
solve this issue you could open recordset on a client side, then disconnect
it from the connection setting ActiveConnection of it to Nothing. After that
you still have an opened recordset, but now you could close connection.

Signature

Val Mazur
Microsoft MVP

http://xport.mvps.org

>I created a function whose only job is to open a recordset, passing various
> parameters to it that it might need to know. The idea was to then pass
[quoted text clipped - 10 lines]
> way
> but maybe not.
smk23 - 24 May 2005 02:12 GMT
Val: I am using VBA in MS Access 2003. Does that support a disconnected
recordset? I know that .Net does. But now it's complaining that the
connection is closed. I changed the cursor location to client.
Signature

sam

> Hi,
>
[quoted text clipped - 17 lines]
> > way
> > but maybe not.
Val Mazur (MVP) - 25 May 2005 01:45 GMT
Hi,

Yes, it supports disconnected recordsets as well. What is your code? Could
you post it here? Where it complains that connection is closed?

Signature

Val Mazur
Microsoft MVP

http://xport.mvps.org

> Val: I am using VBA in MS Access 2003. Does that support a disconnected
> recordset? I know that .Net does. But now it's complaining that the
[quoted text clipped - 28 lines]
>> > way
>> > but maybe not.
smk23 - 28 May 2005 14:16 GMT
Val, thanks. Problem is that I am learning from someone else's code and I
don't know what I'm doing. I'm going to get a book (Bill Vaughn's?) and get a
better grasp of the topic. I couldn't pinpoint the issue right now.
Signature

sam

> Hi,
>
[quoted text clipped - 33 lines]
> >> > way
> >> > but maybe not.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.