|
Database Connectivity |
Top Previous Next |
|
To link DbNetGrid or DbNetEdit to a database you will need to specify the ConnectionString property. This property refers to a name attribute of an element in the <ConnectionStrings> section of the web.config file. e.g. <?xml version="1.0"?>
The connectionString attribute defines the actual ADO.NET connection string used to connect to the database. The connection string can include a special property called DataProvider which can be used to specify the ADO.NET Data Provider used to make the connection.
DbNetSuiteVS supports the following databases.
Connection strings for SQL Server are assigned in one of two formats depending on whether you want to connect using Windows or SQL Server authentication. Using Windows authentication Server=ServerName;Database=DatabaseName;Trusted_Connection=true; Using SQL Server authentication Server=ServerName;Database=DatabaseName;UID=username;PWD=password;
Data source property should specify the path to an Access MDB file Example connection string Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\data\msjet\hr.mdb
Data source property should specify the path to an Access ACCMB file. Example connection string Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\data\access2007\Marketing projects.accdb
Note that connection to the new Access 2007 ACCMB file format requires the 2007 Office Data Connectivity Components to be installed Connection strings for Oracle are assigned in one of two formats depending on whether you want to connect using Windows or Oracle authentication. The Data Source refers to Using Windows authentication Example connection string Server=//server4/XE;Integrated Security=SSPI;DataProvider=OracleClient; Using SQL Server authentication Example connection string Server=//server4/XE;User ID=nwind;Password=nwind;DataProvider=OracleClient;
Example connection string Server=servername;Port=3306;Database=databasename;User ID=username;Password=password;DataProvider=MySql;
Example connection string Server=Servername;Database=DatabaseName;uid=username;pwd=password;CurrentSchema=schemaname;DataProvider=DB2;
Connection requires the Visual FoxPro OleDb driver which can be downloaded from here Example connection string Provider=vfpoledb;data source=/data/vfp/northwind/northwind.dbc;DataProvider=OleDb;
Connection requires the VistaDB .NET data provider. Example connection string Data Source=/data/vistadb/northwind.vdb3;DataProvider=VistaDB;
Connection requires the MS JET OleDB driver (specifying DBASE in the Extended Properties property) Example connection string Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\GoldMine\Demo;Extended Properties=DBASE IV;
Connection requires the Pervasive .Net Data Provider Example connection string Server=ServerName;ServerDSN=DataSetName;DataProvider=Pervasive;
Connection requires the Firebird .Net Data Provider Example connection string Server=ServerName;Database=C:\firebird\nwind\nwind.FDB;User ID=sysdba;Password=masterkey;DataProvider=Firebird;
Connection requires the Npgsql Data Provider Example connection string server=localhost;User Id=postgres;Password=postgres;Database=northwind;Port=5432;DataProvider=Npgsql;
SqlClient
Provider for connections to Access and Visual FoxPro.
Provider for connections to Oracle. Also requires the installation of the Oracle Call Interface (OCI) on the client.
Provider for connections to MySql.
Provider for connections to DB2. Also requires the installation of the DB2 client.
Provider for connections to VistaDB.
Provider for connections to Pervasive.
Provider for connections to Firebird.
Connect to one of the supported databases using an ODBC DSN
Data Provider for connections to PostgreSql.
|