|
| |
|
|
JohnH
Posts: 43 Joined: 12/1/2004 Status: offline
|
SQL Query using ADO connection - 4/23/2008 10:53:46
This is probably a really easy one (I am hoping!) Can someone tell me why my SQL query is only returning the first record? I have 85 rows of data in the table.
<%
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "PROVIDER=SQLOLEDB;DATA SOURCE=xxx;UID=xxx;PWD=xxx;DATABASE=xxx"
Set rs = Server.CreateObject("ADODB.Recordset")
SQL = "select * from trans"
rs.open SQL, conn
response.write rs("REQ_ID")
rs.close
conn.close
Set rs = Nothing
Set conn = Nothing
%>
Thanks John
|
|
|
|
rdouglass
Posts: 9137 From: Biddeford, ME USA Status: offline
|
RE: SQL Query using ADO connection - 4/23/2008 11:18:02
There isn't a loop in there. Try something like this:
...
rs.open SQL, conn
do while NOT rs.EOF
response.write rs("REQ_ID")
rs.MoveNext
loop
rs.close
... See what I did?
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
JohnH
Posts: 43 Joined: 12/1/2004 Status: offline
|
RE: SQL Query using ADO connection - 4/25/2008 6:37:37
Thanks rdouglas.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|