Query Database, Display as hyperlink

Query Database, Display as hyperlink

am 20.06.2007 15:29:56 von BOBss

I am using ASP with VBScript. I want to query an access database username
field, and display the output as a hyperlink on an a webpage.The webpage
will display all records. I then need to be able to select a given
record(hyperlink), and display all of the fields for that record on another
webpage so I can execute some code against it.

Can anyone point me to some sample code so I can get an idea of how to
accomplis this?

Thanks in advance

Re: Query Database, Display as hyperlink

am 21.06.2007 07:24:25 von Adrienne Boswell

Gazing into my crystal ball I observed "BOBss" writing
in news:uMzCY8zsHHA.1416@TK2MSFTNGP06.phx.gbl:

> I am using ASP with VBScript. I want to query an access database
> username field, and display the output as a hyperlink on an a
> webpage.The webpage will display all records. I then need to be able
> to select a given record(hyperlink), and display all of the fields for
> that record on another webpage so I can execute some code against it.
>
> Can anyone point me to some sample code so I can get an idea of how to
> accomplis this?
>
> Thanks in advance
>
>
>
<%

dim sql, rs, rsarr, norecords, i

'I don't know your fieldnames, just assuming here

sql = "SELECT id, username FROM table "
set rs = createobject("ADODB.Recordset")
rs.Open sql, yourconnection
if not rs.EOF then
rsarr = rs.getrows()
norecords = false
else
norecords = true
end if
rs.Close
set rs = nothing

if not norecords then
%>


<%
else
%>

No records available.


<% end if%>



---- processpage.asp ----
<% id = request.querystring("id")
sql = "SELECT fields FROM table WHERE id = " & id
'do whatever else you need to do from here

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Re: Query Database, Display as hyperlink

am 21.06.2007 09:50:37 von exjxw.hannivoort

Adrienne Boswell wrote on 21 jun 2007 in
microsoft.public.inetserver.asp.general:

>

  • <%=rsarr(1,i)%>

  • >

    ?

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)

    Re: Query Database, Display as hyperlink

    am 21.06.2007 16:35:43 von Adrienne Boswell

    Gazing into my crystal ball I observed "Evertjan."
    writing in news:Xns99566422D4289eejj99@
    194.109.133.242:

    > Adrienne Boswell wrote on 21 jun 2007 in
    > microsoft.public.inetserver.asp.general:
    >
    >>

  • <%=rsarr(1,i)%>

  • >>
    >
    >
    ?
    >

    Validation Failed - XXX Errors

    It was late, sorry about that.

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share