''SqlDataReader not define" error

G

Guest

I want to Declear a variable as SqlDataReader in ASP 2.0. But when i do so it
tells me SqlDataReader is not define. This same code works in my previous
application in ASP 1.0. Has this change? Can someone show me how to do this.
Below is the function and the line of the error is bold.

Function GetUniversity() As String
Dim Unipayment As New UnipaymentDB
Dim CIDR As SqlDataReader =
Unipayment.StudentState(Request.Params("StudentID"))

'Intilize university name depending on courseID
GetUniversity = ""
If CIDR.Read Then
If CIDR("CourseID") = "CMS" Or CIDR("CouresID") =
"DMS" Or CIDR("CourseID") = "MBA" Then
GetUniversity = "University of Leicester"
Else
GetUniversity = "London Metropolitan
University"
End If
CIDR.close()
End If
End Function
 
G

Guest

yes i'm referencing it and i do have system.data.sqlclient in the page-behind
code in the app_code folder where unipaymentdb is still not work.

i tried Dim CIDR As System.Data.SqlClient.SqlDataReader =
Unipayment.StudentState(Request.Params("StudentID")) which worked. But don't
know why the previous doen't
 
K

Karl Seguin [MVP]

well, atleast you got it working. I'm not sure what the issue is either. I'd
still guess it's just a syntax error somewhere..

Karl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top