Posted: 12/14/2005, 10:04 PM |
|
Hello,
I have this problem that I need to do a while/loop thru a select query result. I’ve done this several times in CCS/ASP3.0, but I can’t seem to get it working on CCS/.NET(VB)
The code I use on ASP3.0 is this:
Dim SQL
Dim RecordSet
Dim D_EDQT01
SQL = "select * from table_name"
Set RecordSet = ConnectionName.Execute(SQL)
do until RecordSet.EOF
'Code Executed
D_EDQT01 = RecordSet("EDQT01")
RecordSet.MoveNext
Loop
In .NET (VB) I did this:
Dim D_EDQT01 As String
Dim Request As HttpRequest = HttpContext.Current.Request
Dim NewDao As DataAccessObject = Settings.MSDBDataAccessObject
Dim Sql As String = Sql = “select * from table_name”
Set Request = NewDao.RunSql(Sql)
do until Request.EOF
'Code Executed
D_EDQT01 = Request("EDQT01")
Request.MoveNext
Loop
And I get these errors:
Quote :Error: C:\DOCUME~1\GUILLE~1\LOCALS~1\Temp\~DROGU~1\basket.aspx.vb(360) : error BC30807: 'Let' and 'Set' assignment statements are no longer supported.
Set Request = NewDao.RunSql(Sql)
~~~
Error: C:\DOCUME~1\GUILLE~1\LOCALS~1\Temp\~DROGU~1\basket.aspx.vb(360) : error BC30311: Value of type 'System.Data.DataSet' cannot be converted to 'System.Web.HttpRequest'.
Set Request = NewDao.RunSql(Sql)
~~~~~~~~~~~~~~~~~~
Error: C:\DOCUME~1\GUILLE~1\LOCALS~1\Temp\~DROGU~1\basket.aspx.vb(377) : error BC30456: 'EOF' is not a member of 'System.Web.HttpRequest'.
do until Request.EOF
~~~~~~~~~~~
Error: C:\DOCUME~1\GUILLE~1\LOCALS~1\Temp\~DROGU~1\basket.aspx.vb(401) : error BC30456: 'MoveNext' is not a member of 'System.Web.HttpRequest'.
Request.MoveNext
~~~~~~~~~~~~~~~~
I looked thru the help file and the .NET forums in CCS, but didn’t found anything. So I’m writing this thread to see what could be the correct way to accomplish this.
Thanks…
Guillermo
|