Hi All,
I am trying to retrieve the last record updated by the user in the windows application, the code that I am using is
There is an error message as Invalid Exception was handled "No data exists for the row/column", row (Rec_ID) is an auto number. The data insertion is good but the retrieval is a problem Please help me in resolving the query.
Thanks in advance.
I am trying to retrieve the last record updated by the user in the windows application, the code that I am using is
VB.NET:
Dim objconnection As New OleDbConnection Dim cmdOledb As New OleDbCommand
Dim objcmd As New OleDbCommand
Dim cmdInsert As New OleDbCommand
'Dim strsql As String
Dim dbconn As New OleDbConnection
'Dim last As Char
dbconn = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\Srinivas_rao_n\Documents\Ideation.accdb;")
dbconn.Open()
cmdOledb.CommandText = "select max(rec_id) from idea"
cmdOledb.Connection = dbconn
Dim rdroledb As OleDbDataReader = cmdOledb.ExecuteReader
Label3.Text = rdroledb.Item(0).ToString
There is an error message as Invalid Exception was handled "No data exists for the row/column", row (Rec_ID) is an auto number. The data insertion is good but the retrieval is a problem Please help me in resolving the query.
Thanks in advance.