Question about connections

E

EManning

Using an A2K adp and SQL 2000.

I have an adp with a fairly large number of stored procedures. I open and
close a connection every time I use an sp. Is this necessary or can I just
open one connection when the database is opened and then close it when the
database is closed?

The reason I'm asking is that most of the time I close the connection after
using the sp. But sometimes I forget and I get an invalid connection
message. So I was just wondering if all these connections are
necessary...maybe just one would do.

Thanks for any help or advice.
 
V

Vadim Rapp

E> Using an A2K adp and SQL 2000.

E> I have an adp with a fairly large number of stored
E> procedures. I open and close a connection every
E> time I use an sp. Is this necessary or can I just
E> open one connection when the database is opened and
E> then close it when the database is closed?

You don't need any extra connections. You can run sp by using docmd.runsql
or currentproject.connection.execute.

Vadim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top