Hm, no of course:

Just create one ADODB.Connection - open it once - somewhere before any DB
activity
and use it with all the recordsets like this:

Set db = Server.CreateObject("ADODB.Connection")
db.Open "here your db connect string goes"
' Something else ...
And then:
Set rst = db.Execute("Some query")
' Something else
Set rst = Server.CreateObject("ADODB.Recordset")
rst.Open "Another query", db, options...

The ADODB.Connection represents your connection to the
db thus keep it open as long as you need and close it after the last
operation or
if not sure at the very end of the page. In fact set db = Nothing will be
better
will close the connection while destroying the object.




-----Original Message-----
From: Susan Lin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 13, 2001 5:06 PM
To: ActiveServerPages
Subject: Re: preselect dropdown


Hi, dear all,

It's great to know your discussion - for I do need this function to improve
my program and it's not written in my 3 ASP handbooks.

It works pretty good - thank you all.  Just one question, since I have many
tables (for instance table A, B, C,) in one X.mdb file to compose one
request form's 3 drop-down-lists fields.  Do I need to declare complete
Driver, mappath, server object,set recordset etc. in lines each time for
each table used in the drop-down-list?

I tried to omit the same driver, mappath, object connection commands, it
appeared error codes.  Just would like to know how I can make it shorter in
this program...  Would appreciate your kind advise.  TIA :O)

best regards,
Susan




---
You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%


---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to