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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unable to display information

Status
Not open for further replies.

immotal

Technical User
Sep 1, 2003
9
SG
hi i hav problem display the information i have saved in the database..can anione help mi ? thx a lot! The codes are below..by the way gt can intro ani website that teaches using sql to appy on asp codes.....Reali thx a lot!


<% Option Explicit %>
<%
dim conn
dim rs
dim varDatabaseName
dim sql
varDatabaseName=&quot;db2.mdb&quot;

set conn = server.createobject(&quot;ADODB.connection&quot;)
conn.open &quot;DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=&quot; & Server.MapPath(varDatabaseName)
set rs = server.createobject(&quot;ADODB.recordset&quot;)
rs.CursorType = 2
rs.LockType = 3

dim s
s = &quot;Select * from friens&quot;
rs.open s,conn


Do While Not rs.EOF
response.write rs(&quot;Firstname&quot;) &
response.write rs(&quot;Lastname&quot;) &
response.write rs(&quot;Gender&quot;) &
response.write rs(&quot;Age&quot;) &
response.write rs(&quot;Email&quot;) &
rs.movenext
loop

rs.close
set rs=nothing
conn.close
set conn=nothing

%>

 
Hi...
first od all, you don't have to have & after your response.writes
and if the problem is not that, please post your problem...

----
TNX.
E.T.
 
ohh kk.. i manage to solve it thx a lot.. but how do i display information for one record..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top