TurboDB.NET Managed Provider
Database Connections
Top 


As described in "Single-File Databases and Database Directories" TurboDB supports two types of databases. The more traditional one, where each table and index has its own file on the hard disk and one, where all data is contained in one single file. In order to connect to a database, you have to set the DataSource property of the TurboDBConnection to either the database directory or to the database file. E.g:

// This opens a directory database
TurboDBConnection connection = new TurboDBConnection("c:\mydatabasedirectory\");
connection.Open();
// Now you can access database tables in *.dat files in this directory


/
/ This opens a database file 
TurboDBConnection connection = new TurboDBConnection("c:\mydatabases\database1.tdbd");
connection.Open();
// Now you can access database tables within the database file

In order to create a database file, you can use the method CreateDatabase of TurboDBConnection.