Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: RE: Select Query


Message #1 by "L McCann" <lmccann@c...> on Wed, 24 Jul 2002 13:41:59
Nice! 

Many thanks that's given me a lot to work on.



> of course - and you do it the exact same way as you when you write the 
link
text out.

response.write("<a href=""somelink.asp?model=" & objRS("model") & """>" &
objRS("model") & "</a>")

-Kim

> -----Original Message-----
> From: L McCann [mailto:lmccann@c...]
> Sent: 24. juli 2002 13:17
> To: ASP Databases
> Subject: [asp_databases] RE: Select Query
>
>
> To be a bit more pushy:-) Can you then use the obRS("Model") in the 
href.
> I.E.
> To pass the model number to another asp page for further queries.
>
> response.write("<a href=""somelink.asp?=  objRS("MODEL") ""
>
Message #2 by "Kim Iwan Hansen" <kimiwan@k...> on Wed, 24 Jul 2002 14:23:45 +0200
of course - and you do it the exact same way as you when you write the link
text out.

response.write("<a href=""somelink.asp?model=" & objRS("model") & """>" &
objRS("model") & "</a>")

-Kim

> -----Original Message-----
> From: L McCann [mailto:lmccann@c...]
> Sent: 24. juli 2002 13:17
> To: ASP Databases
> Subject: [asp_databases] RE: Select Query
>
>
> To be a bit more pushy:-) Can you then use the obRS("Model") in the href.
> I.E.
> To pass the model number to another asp page for further queries.
>
> response.write("<a href=""somelink.asp?=  objRS("MODEL") ""
>
>
>
>
>
> > that's pure html - so response.write the html anchor tag around the
> text you
> want to be a link.
>
> response.write("<a href=""somelink.asp"">" & objRS("Model") & "</a>")
>
> -Kim
>
> > -----Original Message-----
> > From: L McCann [mailto:lmccann@c...]
> > Sent: 24. juli 2002 12:26
> > To: ASP Databases
> > Subject: [asp_databases] RE: Select Query
> >
> >
> > Thanks, worked a treat. Now if I can beg some more information. How do I
> > take the results of a query that I am wroting to a table on the asp page
> > and make them hyperlinks.
> > i.e. instead of just this being displayed,
> >
> > Response.Write  ("<TD align=center WIDTH = '300'><FONT SIZE=3
> > COLOR=BLUE><STRONG>" & objRS("Model") & "</TD> ")
> >
> > if the page visitor clicks on it it would link to another asp page.
>

Message #3 by "L McCann" <lmccann@c...> on Wed, 24 Jul 2002 13:16:58
To be a bit more pushy:-) Can you then use the obRS("Model") in the href.
I.E.
To pass the model number to another asp page for further queries.

response.write("<a href=""somelink.asp?=  objRS("MODEL") ""





> that's pure html - so response.write the html anchor tag around the 
text you
want to be a link.

response.write("<a href=""somelink.asp"">" & objRS("Model") & "</a>")

-Kim

> -----Original Message-----
> From: L McCann [mailto:lmccann@c...]
> Sent: 24. juli 2002 12:26
> To: ASP Databases
> Subject: [asp_databases] RE: Select Query
>
>
> Thanks, worked a treat. Now if I can beg some more information. How do I
> take the results of a query that I am wroting to a table on the asp page
> and make them hyperlinks.
> i.e. instead of just this being displayed,
>
> Response.Write  ("<TD align=center WIDTH = '300'><FONT SIZE=3
> COLOR=BLUE><STRONG>" & objRS("Model") & "</TD> ")
>
> if the page visitor clicks on it it would link to another asp page.

Message #4 by "Kim Iwan Hansen" <kimiwan@k...> on Wed, 24 Jul 2002 13:43:20 +0200
that's pure html - so response.write the html anchor tag around the text you
want to be a link.

response.write("<a href=""somelink.asp"">" & objRS("Model") & "</a>")

-Kim

> -----Original Message-----
> From: L McCann [mailto:lmccann@c...]
> Sent: 24. juli 2002 12:26
> To: ASP Databases
> Subject: [asp_databases] RE: Select Query
>
>
> Thanks, worked a treat. Now if I can beg some more information. How do I
> take the results of a query that I am wroting to a table on the asp page
> and make them hyperlinks.
> i.e. instead of just this being displayed,
>
> Response.Write  ("<TD align=center WIDTH = '300'><FONT SIZE=3
> COLOR=BLUE><STRONG>" & objRS("Model") & "</TD> ")
>
> if the page visitor clicks on it it would link to another asp page.

Message #5 by "L McCann" <lmccann@c...> on Wed, 24 Jul 2002 12:26:23
Thanks, worked a treat. Now if I can beg some more information. How do I 
take the results of a query that I am wroting to a table on the asp page 
and make them hyperlinks.
i.e. instead of just this being displayed,

Response.Write  ("<TD align=center WIDTH = '300'><FONT SIZE=3 
COLOR=BLUE><STRONG>" & objRS("Model") & "</TD> ")

if the page visitor clicks on it it would link to another asp page.
Message #6 by =?iso-8859-1?Q?Carlos Pedro?= <cpedro@i...> on Wed, 24 Jul 2002 12:07:05 +0100
hi,
Mi english is poor but i'm going explain!!

you do the first sql select and in a cicle while you do the other like 
this

sql = "select Model_ID FROM Models where Manufacturer = ('" & 
> imanufacturer & "')"
set rs = objconnection.execute(sql)
do while not rs.eof

  sql_2 = "query"
  set rs = objconnection.execute(sql_2)
  do while not rs_2.eof


  loop
set rs_2 = nothing
loop
set rs = nothing

I hope this code help you

another way is to do one sql statement only
----- Mensagem Original -----
De: "L McCann" <lmccann@c...>
Data: Quarta-feira, 24 de Julho de 2002, 11:43
Assunto: [asp_databases] Select Query

> Hi,
> I want to use a select query result in another select query on 
> another 
> table.
> 
> eg.
> 
> strSQL= "select Model_ID FROM Models where Manufacturer = ('" & 
> imanufacturer & "')"
> 
> I then want to search another table using the Model_ID value from 
> strSQL.
> I'm sure this is easy but I am new to asp and am getting lost.
> 
> Thanks in Advnace..
> to unsubscribe send a blank email to leave-asp_databases-
> 516279F@p...

Message #7 by "Kim Iwan Hansen" <kimiwan@k...> on Wed, 24 Jul 2002 12:48:40 +0200
SELECT <fieldnames> FROM <tablename> WHERE <Model_ID_field> IN (SELECT
Model_ID FROM Models WHERE Manufacturer = '" & imanufacturer & "')

<fieldnames> is the list of field names you want to retrive
<tablename> is the name of the other table
<Model_ID_field> is the field that relates to the Model_ID in the Models
table

-Kim

> -----Original Message-----
> From: L McCann [mailto:lmccann@c...]
> Sent: 24. juli 2002 11:43
> To: ASP Databases
> Subject: [asp_databases] Select Query
>
>
> Hi,
> I want to use a select query result in another select query on another
> table.
>
> eg.
>
> strSQL= "select Model_ID FROM Models where Manufacturer = ('" &
> imanufacturer & "')"
>
> I then want to search another table using the Model_ID value from strSQL.
>
> I'm sure this is easy but I am new to asp and am getting lost.
>
> Thanks in Advnace..

Message #8 by "L McCann" <lmccann@c...> on Wed, 24 Jul 2002 11:43:08
Hi,
I want to use a select query result in another select query on another 
table.

eg.

strSQL= "select Model_ID FROM Models where Manufacturer = ('" & 
imanufacturer & "')"

I then want to search another table using the Model_ID value from strSQL.

I'm sure this is easy but I am new to asp and am getting lost.

Thanks in Advnace..
Message #9 by "L McCann" <lmccann@c...> on Wed, 24 Jul 2002 12:55:38
Ahhh, I was single quoting the href.
Many thanks.


> that's pure html - so response.write the html anchor tag around the 
text you
want to be a link.

response.write("<a href=""somelink.asp"">" & objRS("Model") & "</a>")

-Kim



  Return to Index