string connectionString =
"User=SYSDBA;" +
"Password=masterkey;" +
"Database=F:\FirebirdDB\ estdb.fdb;" +
"DataSource=localhost;" +
"Charset=UTF8;" +
"ServerType=0"; // Type: 0 - Server, 1 - Embedded
FbConnectionStringBuilder csb = new FbConnectionStringBuilder();
csb.UserID = "SYSDBA";
csb.Password = "masterkey";
csb.Database = "F:\FirebirdDB\ estdb.fdb";
csb.DataSource = "localhost";
csb.Charset = "UTF8";
csb.ServerType = FbServerType.Default;
// Create Database
FbConnection.CreateDatabase(csb.ToString());
// Create Connection object
FbConnection conFirebird = new FbConnection(csb.ToString());
:
// Drop Database
FbConnection.DropDatabase(csb.ToString());
FbConnectionStringBuilder Properties (출처: Firebird .Net Provider SDK 1.7 문서)
Name | Type | Description |
Charset | string | Gets or sets the connection character set. |
ClientLibrary | string | |
ConnectionLifeTime | int | Gets or sets the lifetime of a connection in the pool. |
ConnectionTimeout | int | Gets the time to wait while trying to establish a connection before terminating the attempt and generating an error. |
ContextConnection | bool | |
Database | string | Gets the name of the actual database or the database to be used when a connection is open. |
DataSource | string | Gets the name of the Firebird Server to which to connect. |
DbCachePages | int | |
Dialect | int | Gets or sets the database dialect. |
Enlist | bool | |
FetchSize | int | Indicates the number of rows that will be fetched at the same time on Read calls into the internal row buffer. |
IsolationLevel | IsolationLevel | Gets or sets the default Isolation Leve for implicit transactions. |
MaxPoolSize | int | Gets or sets the maximun pool size. |
MinPoolSize | int | Gets or sets the minumun pool size. |
PacketSize | int | Gets or sets the size (in bytes) of network packets used to communicate with an instance of Firebird Server. |
Password | string | Gets ort sets the password for the Firebird user account. |
Pooling | bool | Gets or sets the status of the connection pooling. |
Port | int | Gets or sets the port number in the server for establish the connection. |
ReturnRecordsAffected | bool | |
Role | string | Gets or sets the suer role name. |
ServerType | FbServerType | Gets or sets the server type to wich we want to connect. |
UserID | string | Gets or sets the firebird User account for login. |
<
Original Post : http://neodreamer-dev.tistory.com/580
No comments :
Post a Comment