Hello,
The database I'm working with has these 2 fields:
- "CD", which stands for "Consolidat ed Design Number" (not Compact
DISC)
and
- "URL", which is the full URL (http://...)
Users need to be able to type a CD number into a form text box and,
upon submission, be redirected to a non-database-driven html index
(home page) for all the info associated with that paricular CD. A
drop-down might be simpler, but it would be way too long since there
are many, many numbers.
Here's what I have. Can't seem to get it to work.
Any assistance would be very much appreciated. Thanks!
<%
sDSN = "Driver={Micros oft Access Driver
(*.mdb)};Dbq=pa th-to-my-db.mdb;"
%>
<%
set ac = CreateObject("A DODB.Connection ")
set ar = CreateObject("A DODB.Recordset" )
ac.Open sDSN '"DSN=my-db","myuser","m ypass"
sSQL = "SELECT URL FROM mytable WHERE CD=" & Request.Form("C D")
set ar = ac.Execute(sSQL )
if NOT ar.EOF then
URL = ar("URL")
Response.Redire ct url
else
' new customer or bad ID
End If
%>