What I want is an array which would store all the ID values coming from the database.How to do the same?
-
Can you fetch value from database. If it is post some codes what you've triedpolin– polin2012-10-20 10:38:09 +00:00Commented Oct 20, 2012 at 10:38
-
Please provide more information. How exactly are the values "coming from the database"? What do you want to do with the values once you retrieved them from the database?Ansgar Wiechers– Ansgar Wiechers2012-10-20 10:55:37 +00:00Commented Oct 20, 2012 at 10:55
Add a comment
|
1 Answer
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
%>