
Originally Posted by
-RaJ-
by not working i meant to say is its showing 0 record's affected for that query command
Code:
Using cmd As New OleDbCommand("SELECT * from MY_SETTING;", Conn)
Debug.Print("Total ID : " & cmd.ExecuteNonQuery())
End Using
it must show some positive non zero values, in other word's its not able to select it !! to data reader
DataReader is showing as
.hasRow = False
this error has never happened to me before!
What is confusing is, do you want to return rows or a count of rows?
Seeing this yet at the same time Total mixed with ID does not makes sense
Code:
Debug.Print("Total ID : " & cmd.ExecuteNonQuery())
Looks like you want total row count which would be done as follows.
Code:
cmd.CommandText = "SELECT COUNT(*) From MY_SETTING"
Dim CustCount = CLng(cmd.ExecuteScalar)
If you want rows back and not a count then use cmd.ExecuteReader.