Hello,
I have a problem when I developed the ASP web application
for multiple users to access SQL server 7. Users can
retrieve, insert, update, and delete data. When I retrieve
data sometimes it only can get first row. When I click
refresh button on Internet Explorer all rows come out
sometimes, I checked the coding and couldn't find where
the problem comes from. Also I am not sure the problem
comes from ASP coding or SQL server or IIS.
Here is the coding sample:
<%
'Connect the Database
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.Open "DSN=CJ;UID=sa;PWD=;database=northwind"
'SQL Command
SQL="Select CategoryName, CategoryID from Categories "
'run SQL Command
Set RS=Conn.Execute(SQL)
'Appear result
Response.write "<table Align=center border=1
cellpadding=0 cellspacing=0 widthp0>"
Response.write "<tr >"
Response.write "<td colspan=2><B>" & Ucase(rs(0).Name)
& "</B></td>"
Response.write "<td colspan=2><B>" & Ucase(rs(1).Name)
& "</B></td>"
Response.write "</tr>"
do While Not rs.EOF
Response.write "<tr>"
Response.write "<td colspan=2><b>" & rs(0).Value
&"</B></td>"
Response.write "<td colspan=2><b>" & rs(1).Value
&"</B></td>"
Response.write "</tr>"
rs.MoveNext
loop
Response.write "</table>"
Set Conn = nothing
%>
Thanks in advance
Leer las respuestas