access to an ASP page (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


wizard_oz -> access to an ASP page (9/14/2004 2:04:58)

Hey, I have a problem to get into the same ASP file for example

dim product_id
set product_id=Request.QueryString("product_id")

dim conn13
set conn13=server.CreateObject("ADODB.connection")
conn13.Open "dsn=teknion"

dim sql13,rs13,sql14
set rs13=server.CreateObject("ADODB.recordset")
set rs15=server.CreateObject("ADODB.recordset")

sql13="select * from products where product_id=" & product_id
sql15="select * from storymenu where story_id=" & product_id

rs13.Open sql13,conn13
rs15.Open sql15,conn13

Response.Write "<a href=" & "default.asp?story_id=" & rs15("story_id") & "><img src='../images/" & rs13("menu1") & "'></a>"

%>

The name of the file is default.asp ,can I link to the same file?




BeTheBall -> RE: access to an ASP page (9/14/2004 9:35:07)

Sorry wizard, can't say as I can follow the yellow brick road on this one. Can you elaborate a little? The above code appears sound, is there something wrong with it?




Spooky -> RE: access to an ASP page (9/14/2004 14:13:33)

I think Id be looking at joining the tables, not opening 2 recordsets




BeTheBall -> RE: access to an ASP page (9/14/2004 14:32:44)

Good point. [sm=icon_redface.gif]




wizard_oz -> RE: access to an ASP page (9/14/2004 14:36:34)

sorry' I didn't understand you
the reason I open 2 recordset is because I am using 2 tables at my database




BeTheBall -> RE: access to an ASP page (9/14/2004 14:56:38)

Explain in more detail your original question. What are you trying to do and what in the code you posted is the problem.




wizard_oz -> RE: access to an ASP page (9/15/2004 7:17:38)

look at the link:http://www.teknion.com/products/systems_transit/default.asp?country=canada
you will see that the menu in blue in in database but it is calling to the same page' I want to do the same think




BeTheBall -> RE: access to an ASP page (9/15/2004 10:01:54)

That is determined by the form. The form submits to the same page. The code for the form is:

<form action="default.asp" method="get">

When the form is submitted, the criteria for the SQL statement is updated to whatever was chosen in the dropdown. Make sense?




wizard_oz -> RE: access to an ASP page (9/15/2004 17:14:43)

Thanks, I will check it out today later
I hope it will work for me.
Elen




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625