Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing data connections for a Recordset DTC?

Status
Not open for further replies.

jimster

Technical User
Dec 1, 2000
3
GB
I have an ASP page with a Recordset DTC and a Grid DTC on it. I have set up three Data Commands to three separate Access databases, through the Data Environment. If I set the command details for the Recordset DTC through its property pages, the grid is populated.

However, I am passing a string to the page and I want to be able to change the connection and SQL text for the Recordset DTC at run-time depending on the string. Is this possible without having to use three separate Recordset DTCs.

Cheers
 
jimster,

Look at the Recordset.onbeforeload() event. You can set the SQLText property of the Recordset in that event.

I've never tried changing the connection property but that should work as well.

Good luck
-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top