OLEDB Provider
-
Try to connect to a database with one. If it fails, try the other.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
Try to connect to a database with one. If it fails, try the other.
A guide to posting questions on CodeProject[^]
Dave KreskowiakMy idea exactly, but then I didn't want to reply that, as it sounds a bit like "I really don't know"... :laugh:
Luc Pattyn [My Articles] Nil Volentibus Arduum
-
My idea exactly, but then I didn't want to reply that, as it sounds a bit like "I really don't know"... :laugh:
Luc Pattyn [My Articles] Nil Volentibus Arduum
Really, it's the only reliable way to do it. Actually, I'd try using ACE.12 first, then downgrade to 4.0. You could start check the version of Office that's installed, but then some application could have installed one of the Access Runtimes and making the detection code inaccurate.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
Really, it's the only reliable way to do it. Actually, I'd try using ACE.12 first, then downgrade to 4.0. You could start check the version of Office that's installed, but then some application could have installed one of the Access Runtimes and making the detection code inaccurate.
A guide to posting questions on CodeProject[^]
Dave KreskowiakI fully agree; even if I knew a way to determine something like that, I'd probably go for the functional test anyway. With external dependencies involved, I prefer to eat the pudding, rather than to look for the boxes. :)
Luc Pattyn [My Articles] Nil Volentibus Arduum
-
I fully agree; even if I knew a way to determine something like that, I'd probably go for the functional test anyway. With external dependencies involved, I prefer to eat the pudding, rather than to look for the boxes. :)
Luc Pattyn [My Articles] Nil Volentibus Arduum
Luc Pattyn wrote:
I prefer to eat the pudding, rather than to look for the boxes.
:laugh: I haven't heard that one before. That's a good one.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
Try to connect to a database with one. If it fails, try the other.
A guide to posting questions on CodeProject[^]
Dave Kreskowiakwhat You mean? This
Public Sub ConnectToAccess()
Dim conn As New System.Data.OleDb.OleDbConnection()
conn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & databasePath.dbPath & ";Persist Security Info=False;"Try conn.Open() ....... Catch ex As Exception conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & databasePath.dbPath & ";User ID=Admin;Password=" conn.Open()
........
Finally
conn.Close()
End Try
End Sub -
what You mean? This
Public Sub ConnectToAccess()
Dim conn As New System.Data.OleDb.OleDbConnection()
conn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & databasePath.dbPath & ";Persist Security Info=False;"Try conn.Open() ....... Catch ex As Exception conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & databasePath.dbPath & ";User ID=Admin;Password=" conn.Open()
........
Finally
conn.Close()
End Try
End SubKind of. I really wouldn't do it this way, but whatever works for you.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
Kind of. I really wouldn't do it this way, but whatever works for you.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak