W
William Mild
I am porting old Dreamweaver generated ASP code to
ASP.NET (VBScript to VB.NET).
Error: Cast from type 'Field' to type 'Integer' is not
valid
The error occurs on the line which says "rsStudents =
Server.CreateObject("ADODB.Recordset")".
if (Request.QueryString("StudentID") <> "") then
rsStudents__MMColParam = Request.QueryString("StudentID")
Dim rsStudents
rsStudents = Server.CreateObject("ADODB.Recordset")
rsStudents.ActiveConnection = MM_cnReportCards_STRING
rsStudents.Source = "SELECT * FROM dbo.Student WHERE
StudentID = " & Replace
(rsStudents__MMColParam, "'", "''") & ""
rsStudents.CursorType = 0
rsStudents.CursorLocation = 2
rsStudents.LockType = 3
rsStudents.Open()
Dim rsStudents_numRows As Integer = 0
Any ideas, besides rewriting the whole thing using a
datareader?
ASP.NET (VBScript to VB.NET).
Error: Cast from type 'Field' to type 'Integer' is not
valid
The error occurs on the line which says "rsStudents =
Server.CreateObject("ADODB.Recordset")".
if (Request.QueryString("StudentID") <> "") then
rsStudents__MMColParam = Request.QueryString("StudentID")
Dim rsStudents
rsStudents = Server.CreateObject("ADODB.Recordset")
rsStudents.ActiveConnection = MM_cnReportCards_STRING
rsStudents.Source = "SELECT * FROM dbo.Student WHERE
StudentID = " & Replace
(rsStudents__MMColParam, "'", "''") & ""
rsStudents.CursorType = 0
rsStudents.CursorLocation = 2
rsStudents.LockType = 3
rsStudents.Open()
Dim rsStudents_numRows As Integer = 0
Any ideas, besides rewriting the whole thing using a
datareader?