Print Page | Close Window

more then 1 sql querry...

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=207
Printed Date: 28 March 2026 at 10:22pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: more then 1 sql querry...
Posted By: skyworld
Subject: more then 1 sql querry...
Date Posted: 15 February 2003 at 8:54pm

For my app i am making i need more then one sql querry so how would i go about doing that with out having to keep making the ado con and stuff?

 

One of my sql querrys is:

<%
'Dimension variables
Dim adoConmaintence   'Holds the Database Connection Object
Dim rsportalmaintence   'Holds the recordset for the records in the database
Dim SQLmaintence   'Holds the SQL query for the database
Dim dblocmaintence
dblocmaintence = "fpdb/jdemirdjian.mdb"
Set adoConmaintence = Server.CreateObject("ADODB.Connection")
adoConmaintence.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath(dbloctop)
Set rsportalmaintence = Server.CreateObject("ADODB.Recordset")
SQLmaintence = "Select * from section where section.ID=1"
rsportalmaintence.Open SQLmaintence, adoConmaintence
%>

 




Replies:
Posted By: michael
Date Posted: 15 February 2003 at 11:09pm
There is no need to open the database again. Just create a new SQL query and and run it again, then close the connection.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net