Quantcast
Viewing all articles
Browse latest Browse all 27039

No data exists for the row/column error

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?

Viewing all articles
Browse latest Browse all 27039

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>