expression does not produce a value
Can anyone tell me in debugging I get the error expression does not produce a value
myCollection.Add(reader.GetInt32(0))
Dim DBConn As IDbConnection = New SqlConnection
(DBConnString.getConnectionString())
Dim DBCommand As IDbCommand = New SqlCommand
DBCommand.CommandText = Session("SQLOutput")
DBCommand.CommandType = CommandType.Text ' Try the intellisense Jason
DBCommand.Connection = DBConn
DBConn.Open()
reader = DBCommand.ExecuteReader(CommandBehavior.CloseConne ction) ' <- this closes the connection to the db when you close the reader Jason
Dim myCollection As New Collection
Dim recordCount As Integer
While reader.Read()
recordCount = recordCount + 1
myCollection.Add(reader.GetInt32(0).ToString)
End While
|