Top
Symfoware Server V12.1.0 Application Development Guide
FUJITSU Software

4.3.3 Using the ProviderFactory Class

Obtain the NpgsqlConnection object from the provider factory.

Example

Code examples for applications

using System.Data.Common;

DbProviderFactory factory = DbProviderFactories.GetFactory("Fujitsu.Npgsql");
DbConnection conn = factory.CreateConnection();
conn.ConnectionString = "Server=sv1;Port=26500;Database=mydb; User Id=myuser;Password=myuser01; Timeout=20;CommandTimeout=20;";

Refer to "4.3.4 Connection String" for information on database connection strings.