No data exists for the row/column error occurs from my following VB.NET code but can't find any problem.
I checked the database and correct data exists in the record.
Dim mycmd As OleDbCommand
Dim dr As OleDbDataReader
mycmd = New OleDbCommand()
mycmd.Connection = cn
mycmd.CommandText = "Select * FROM cdm WHERE seq_no=" & CStr(nProductNo)
dr = mycmd.ExecuteReader()
szRet = ""
If dr.HasRows Then
If Not IsDBNull(dr("notes")) Then
szRet = dr("notes").ToString.Trim
End If
End If
dr.Close()
mycmd.Dispose()
Can anybody help me?
I checked the database and correct data exists in the record.
Dim mycmd As OleDbCommand
Dim dr As OleDbDataReader
mycmd = New OleDbCommand()
mycmd.Connection = cn
mycmd.CommandText = "Select * FROM cdm WHERE seq_no=" & CStr(nProductNo)
dr = mycmd.ExecuteReader()
szRet = ""
If dr.HasRows Then
If Not IsDBNull(dr("notes")) Then
szRet = dr("notes").ToString.Trim
End If
End If
dr.Close()
mycmd.Dispose()
Can anybody help me?