0

I found the post on same forum for read a .db file in c# but is is not showing how to access it's table from code.

So does any one know about how to open a connection and access/read the .db file in vb.net?

I tried the code below to open connection but getting this error:

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

My code is:

Dim connection As OleDbConnection = New OleDbConnection

connection = New OleDbConnection("Provider=SQLOLEDB;Data Source=C:\mydatabase.db;Persist Security Info=True;Integrated Security=SSPI;")

connection.Open()

Thanks.

Community
  • 1
  • 1
Rahul Shirphule
  • 989
  • 3
  • 14
  • 36
  • have you tried something already? – Kees Sonnema Apr 10 '13 at 07:20
  • yes i tried the code just see the edited question. – Rahul Shirphule Apr 10 '13 at 07:37
  • Is your connection string correct? Is the database at C:\mydatabase.db? – Tim Apr 10 '13 at 08:26
  • Also, the post you refer to in your question is regarding a SQLLite database - your question is tagged as a Paradox db. Two different databases. Take a look at [Paradox Connection String Samples](http://www.connectionstrings.com/paradox). – Tim Apr 10 '13 at 08:30
  • Hi Tim, i don't know which file it is means sqlite or paradox so how do i know which file it is? because i open file in sqlite administrative tool then it doesn't open it. it say the file is encrypted or is not valid sql database, so search for reading .db file then i came across paradox. if you have any idea then pls help. Thanks – Rahul Shirphule Apr 10 '13 at 09:14
  • The .db file could be anything. It might be Paradox, it might be something else. If you have no documentation for it and no one is available to tell you what it is, you could try opening it in Excel; otherwise I'd continue to Google for information on how to open .db files, assuming it actually is a database file of some sort. – Tim Apr 10 '13 at 17:23

0 Answers0