Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

showing a record using username

Status
Not open for further replies.

snowboardr

Programmer
Feb 22, 2002
1,401
PH
I can't seem to get this to show a record I get a 500 error.

Code:
<%

'# user.asp?name=admin

ConnString = &quot;Provider=Microsoft.Jet.OLEDB.4.0; Data Source=&quot; & Server.MapPath(&quot;db.mdb&quot;)

set rs = Server.CreateObject(&quot;ADODB.RecordSet&quot;)
rs.Open ConnString

StrSql = &quot;Select * FROM users WHERE username =&quot;  & Request.QueryString(&quot;name&quot;)

rs = my_conn.Execute (StrSQl)

%>
Any suggestions?
 
I got this to work, but only with ID and you had to go like this in the link:

user.asp?mode=display&ID=1

How can I get username to work???!

>> user.asp?name=usernamehere
Code:
<%

ConnString = &quot;Provider=Microsoft.Jet.OLEDB.4.0; Data Source=&quot; & Server.MapPath(&quot;db.mdb&quot;)

set my_conn= Server.CreateObject(&quot;ADODB.Connection&quot;)
set rs = Server.CreateObject(&quot;ADODB.RecordSet&quot;)

my_Conn.Open ConnString

StrSQL = &quot;Select * FROM users WHERE user_id =&quot; & Request.QueryString(&quot;ID&quot;)

rs = my_conn.Execute(StrSQl)


%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top