tags:

views:

366

answers:

3

How do I read and write a file using a file format which is readable by a database server, in vb2008?

I have very little experience working with databases, and I can't seem to find any tutorials which don't involve some type of server as a middle-man.

A: 

If you don't want a server, use SQLite. There are .NET bindings that work quite nicely.

Reading and writing the raw database files would be an immense undertaking -- if you have to ask how to do it, you shouldn't. It requires so much work that it's not even worth considering for a moment.

Cody Brocious
+1  A: 

It's really going to depend on which type of database files you are working with. If you have an Access Database file, you can open a connection to the database with the following code.

Dim DBConn as New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyDBFile.mdb;")
Kibbee
A: 

In general, most database-aware software writes to the database using a software library adapter. Like ODBC.

What you might be looking for is the file format that a bulk loader can understand. Something like this (MySQL example).

Dana Robinson