sciber_dude
asked on
Problem: Using GetRows()
Objective: to get the recordset into an array
Got a wierd problem with using GetRows.
<%
' Connection Strings have been set
set rs = Server.CreateObject("ADODB .recordset ")
SQL = "SELECT TeamName FROM teams"
rs.Open SQL, conn
dim arrTeams
arrTeams = rs.GetRows()
response.write Ubound(arrTeams) & "<br>"
%>
returns:
0
<%
for each z in arrTeams
response.write z & "<br>"
next
%>
returns the following:
Rockets
Knicks
Lakers
Jazz
Hawks
Clippers
How can i get the recordset into an array so that I can reference it as arrTeams(0) ... arrTeams(Ubound(arrTeams))
:) SD
Got a wierd problem with using GetRows.
<%
' Connection Strings have been set
set rs = Server.CreateObject("ADODB
SQL = "SELECT TeamName FROM teams"
rs.Open SQL, conn
dim arrTeams
arrTeams = rs.GetRows()
response.write Ubound(arrTeams) & "<br>"
%>
returns:
0
<%
for each z in arrTeams
response.write z & "<br>"
next
%>
returns the following:
Rockets
Knicks
Lakers
Jazz
Hawks
Clippers
How can i get the recordset into an array so that I can reference it as arrTeams(0) ... arrTeams(Ubound(arrTeams))
:) SD
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks FtB,
this was the first time i was trying the getrows method and i ran into problems. I will test this code in a few min and close this question.
Thank you,
:) SD
this was the first time i was trying the getrows method and i ran into problems. I will test this code in a few min and close this question.
Thank you,
:) SD
ASKER
Thanks FtB, it works like a charm
:) SD
:) SD
Glad to have helped,
FtB
FtB
FtB