Reputation: 29
What I want is an array which would store all the ID values coming from the database.How to do the same?
Upvotes: 0
Views: 443
Reputation: 4116
This is a task for the ADO GetRows method
<%
Dim aRs, oConn, oRS, sSQL
Set oConn=Server.CreateObject("ADODB.Connection")
oConn.Provider = Application("Provider")
oConn.Open Application("Database"), Application("UserName"), Application("Password")
sSQL="SELECT ID FROM yourtable ORDER by ID"
Set oRS = oConn.Execute(sSQL)
if not oRS.eof then
aRS=oRS.GetRows()
end if
oRS.close
oConn.close
%>
Upvotes: 2