Print Page | Close Window

Problem getting info out of database

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=346
Printed Date: 28 March 2026 at 10:23pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Problem getting info out of database
Posted By: mtarby
Subject: Problem getting info out of database
Date Posted: 20 February 2003 at 8:26am
I'm trying to pull records from a database in order to generate a graph of the results. I can connect to the database just fine and write a table of the columns I've selected

<%
Dim oConn, oRs, filePath, Index, i, j
Dim iRecFirst, iRecLast, iFieldFirst, iFieldLast, arrData

filePath = Server.MapPath("/database/database.mdb")
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & filePath
Set oRs = oConn.Execute("SELECT Reunion_Class, Goal_Donors, Paid_Donors From Reunion_Giving")
arrData =oRs.GetRows()
iRecFirst = LBound(arrData, 2)
iRecLast = UBound(arrData, 2)
iFieldFirst = LBound(arrData, 1)
iFieldLast = UBound(arrData, 1)
%>


Here's my problem - I thought this loop would write the data in the column in the spot in the applet where I need it for the graph, but it isn't working. 

<param name=dataset0yURL value="<%Do while NOT oRs.EOF
Response.Write oRs("Goal_Donors")
oRs.MoveNext
Loop
%>">


What am I missing? I know it has to be something basic.

Thanks in advance!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net