Hello,
I am using ASP.net and its SQLdatareader to extract some information from a database and display it on a web page. while in normal ASP this is v v simple, I can't seem to manage it in ASP.net. my code is as follows:
Dim Conn As SqlConnection
Dim SQLCommand2
Dim DataReader As SQlDataReader
Conn = New SqlConnection("server=myserver;" _
& "database=mydb;uid=sa"
'get seat info
SQLCommand2 = new SQLCommand(MySQL,Conn)
conn.open()
DataReader = Sqlcommand2.ExecuteReader()
temp = datareader("production_id"
.tostring()
response.write("temp"
However, when i run this i get the following error:
System.IndexOutOfRangeException: production_id
What does this mean??and how can i fix it???!!!
Cheers,
Neil
PS I realise this is an ASP forum, but there isn't an ASP.net forum so i've posted on here
I am using ASP.net and its SQLdatareader to extract some information from a database and display it on a web page. while in normal ASP this is v v simple, I can't seem to manage it in ASP.net. my code is as follows:
Dim Conn As SqlConnection
Dim SQLCommand2
Dim DataReader As SQlDataReader
Conn = New SqlConnection("server=myserver;" _
& "database=mydb;uid=sa"
'get seat info
SQLCommand2 = new SQLCommand(MySQL,Conn)
conn.open()
DataReader = Sqlcommand2.ExecuteReader()
temp = datareader("production_id"
response.write("temp"
However, when i run this i get the following error:
System.IndexOutOfRangeException: production_id
What does this mean??and how can i fix it???!!!
Cheers,
Neil
PS I realise this is an ASP forum, but there isn't an ASP.net forum so i've posted on here