hi all,
I have developed one application in vb and database MS-Access2003 it works properly if i use ms access 2003 or earlier version but if i run this application with latest version of database than i am able to view the data from database but not able to insert data into database. But if I use ms access 2003 or earlier version than it works properly i am able to view as well as insert data.
Can anybody tell me the solution for this the code i use for database connectivity is as follows ;
Public Function OpenDataBase() As Boolean
Dim dbPath As String
Dim ConnString As String
On Error GoTo dbErrors
dbPath = App.Path & "\Database\ABCD.mdb"
Set UConnection = New ADODB.Connection
Dim strProvider As String
If UConnection.Version < 2 Then 'MS ACCESS 97
strProvider = "Provider=Microsoft.Jet.OLEDB.3.51;"
ElseIf UConnection.Version >= 2 Then 'MS ACCESS 2000
strProvider = "Provider=Microsoft.Jet.OLEDB.4.0;"
End If
ConnString = strProvider & "Persist Security Info=false ;Data Source=" & dbPath
UConnection.ConnectionString = ConnString
UConnection.Open
OpenDataBase = True
Exit Function
dbErrors:
OpenDataBase = False
MsgBox (Err.Description)
End Function
which provider i have to give for latest version of MS-Access
Can anybody help me ?
Regards
Guest11