By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,865 Members | 1,280 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,865 IT Pros & Developers. It's quick & easy.

multiple query on one page

P: n/a
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
Jul 22 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Thu, 6 Jan 2005 22:56:45 -0600, "Auddog" <wi****@hotmail.com>
wrote:
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
Jul 22 '05 #2

P: n/a
Thanks, I got it figured out.,

A
"Jeff Cochran" <je*********@zina.com> wrote in message
news:41***************@msnews.microsoft.com...
On Thu, 6 Jan 2005 22:56:45 -0600, "Auddog" <wi****@hotmail.com>
wrote:
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

Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.