multiple query on one page

A

Auddog

I have created a database request page (wahooo - new to asp and it works)
and everything is great. Now I'm creating a second page and want to know if
I'm able to make two different queries on one page. I want to be able to
create one query that uses a Request.QueryString from a URL and then use one
of the returned values from that query to create another query on the same
page. I hope that make sense. Here is the database connection code:

<%
Dim adoDB, adoRS, strSQL

' Create the Database Object, and connect to it
Set adoDB = Server.CreateObject("ADODB.Connection")
adoDB.Open strConnection
' Create the Recordset Object
Set adoRS = Server.CreateObject("ADODB.RecordSet")
' Create a SQL string, to open the recordset
strSQL = "SELECT * FROM Projects WHERE id = "& id &""
adoRS.Open strSQL, adoDB, adOpenDynamic, adLockReadOnly, adCmdText
%>

I know that this is not the query that I'm using, I'm just showing my
connection code. If there are any great tutorials out there that cover this
I would appreciate a link. Thanks for any help that you might be able to
give.

A
 
J

Jeff Cochran

I have created a database request page (wahooo - new to asp and it works)
and everything is great. Now I'm creating a second page and want to know if
I'm able to make two different queries on one page. I want to be able to
create one query that uses a Request.QueryString from a URL and then use one
of the returned values from that query to create another query on the same
page. I hope that make sense. Here is the database connection code:

<%
Dim adoDB, adoRS, strSQL

' Create the Database Object, and connect to it
Set adoDB = Server.CreateObject("ADODB.Connection")
adoDB.Open strConnection
' Create the Recordset Object
Set adoRS = Server.CreateObject("ADODB.RecordSet")
' Create a SQL string, to open the recordset
strSQL = "SELECT * FROM Projects WHERE id = "& id &""
adoRS.Open strSQL, adoDB, adOpenDynamic, adLockReadOnly, adCmdText
%>

I know that this is not the query that I'm using, I'm just showing my
connection code. If there are any great tutorials out there that cover this
I would appreciate a link. Thanks for any help that you might be able to
give.

Show your query and your table schema, you can probably do it in a
single query. Also tell us what database you're using, and finally,
this is better answered in the microsoft.public.inetserver.asp.db
group.

Jeff
 
A

Auddog

Thanks, I got it figured out.,

A


Jeff Cochran said:
Show your query and your table schema, you can probably do it in a
single query. Also tell us what database you're using, and finally,
this is better answered in the microsoft.public.inetserver.asp.db
group.

Jeff
 

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

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,829
Latest member
KimberAlli

Latest Threads

Top