Embedded 사용도 크게 차이가 없었다.
연결문자열의 ServerType을 1로(FbConnectionStringBuilder를 사용할 경우 csb.ServerType = FbServerType.Embedded;) 설정 하고 Firebird Embedded 패키지의 아래 파일들을 실행파일과 함께 두면 된다.
fbembed.dll
firebird.conf
firebird.msg
ib_util.dll
icudt30.dll
icuin30.dll
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());
| 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. |
txtResult.Clear();
txtResult.AppendText("Begin Testing...\n");
string connectionString =
"User=SYSDBA;" +
"Password=masterkey;" +
"Database=F:\FirebirdDB\ estdb.fdb;" +
"DataSource=localhost;" +
"Charset=UTF8;" +
"ServerType=0"; // Type: 0 - Server, 1 - Embedded
try
{
// Create Database
FbConnection.CreateDatabase(connectionString);
txtResult.AppendText("Create Database...OK\n");
// Create Connection object
FbConnection conFirebird = new FbConnection(connectionString);
txtResult.AppendText("Create Connection Object...OK["
+ conFirebird.State.ToString() + " : "
+ FbConnection.ConnectionPoolsCount.ToString()
+ "]\n");
// Connect
conFirebird.Open();
txtResult.AppendText("Open Connection...OK["
+ conFirebird.State.ToString() + " : "
+ FbConnection.ConnectionPoolsCount.ToString()
+ "]\n");
FbCommand cmdSQL = new FbCommand();
cmdSQL.Connection = conFirebird;
// Create Table
string strQuery = "CREATE TABLE Member"
+ "("
+ " ID VARCHAR(20) NOT NULL,"
+ " NAME VARCHAR(20) NOT NULL,"
+ " ALIAS VARCHAR(20),"
+ " AGE INTEGER"
+ ")";
cmdSQL.CommandText = strQuery;
cmdSQL.ExecuteNonQuery();
txtResult.AppendText("Create test Table...OK\n");
// Insert Data
FbTransaction transInsert = conFirebird.BeginTransaction();
cmdSQL.Transaction = transInsert;
for (int i = 0; i < 5; i++)
{
cmdSQL.CommandText = "INSERT INTO Member(ID, NAME, ALIAS, AGE) "
+ "VALUES ("
+ " 'Man" + i.ToString() + "' "
+ " ,'Name" + i.ToString() + "' "
+ " ,'Alias" + i.ToString() + "' "
+ " ," + (i + 10).ToString()
+ ");";
int nRow = cmdSQL.ExecuteNonQuery();
txtResult.AppendText(" Insert " + nRow.ToString() + "row(s)...OK\n");
}
transInsert.Commit();
transInsert.Dispose();
cmdSQL.Transaction = null;
txtResult.AppendText(" Insertion committed...OK\n");
txtResult.AppendText("Insert data...OK\n");
// Select Data
FbDataAdapter da = new FbDataAdapter("SELECT * FROM Member", conFirebird);
DataTable dt = new DataTable();
da.Fill(dt);
ArrayList lstColumn = new ArrayList();
foreach (DataColumn col in dt.Columns)
{
txtResult.AppendText(col.ColumnName + " ");
lstColumn.Add(col.ColumnName);
}
txtResult.AppendText("\n");
foreach (DataRow row in dt.Rows)
{
txtResult.AppendText(row[lstColumn[0] as string] + " "
+ row[lstColumn[1] as string] + " "
+ row[lstColumn[2] as string] + " "
+ row[lstColumn[3] as string] + " "
+ "\n"
);
}
dt.Clear();
// Update some data
FbTransaction transUpdate = conFirebird.BeginTransaction();
txtResult.AppendText("UPDATE Member SET Age = Age + 20 WHERE Age > 11;\n");
cmdSQL.CommandText = "UPDATE Member SET Age = Age + 20 WHERE Age > 11;";
cmdSQL.Transaction = transUpdate;
int nUpdate = cmdSQL.ExecuteNonQuery();
transUpdate.Commit();
transUpdate.Dispose();
cmdSQL.Transaction = null;
txtResult.AppendText(" " + nUpdate.ToString() + "row(s) updated!\n");
txtResult.AppendText("Update data...OK\n");
// Select Data
da.SelectCommand.CommandText = "SELECT * FROM Member";
da.Fill(dt);
foreach (DataColumn col in dt.Columns)
{
txtResult.AppendText(col.ColumnName + " ");
}
txtResult.AppendText("\n");
foreach (DataRow row in dt.Rows)
{
txtResult.AppendText(row["ID"] + " "
+ row["NAME"] + " "
+ row["ALIAS"] + " "
+ row["AGE"] + " "
+ "\n"
);
}
dt.Clear();
da.Dispose();
// Delete data
cmdSQL.CommandText = "DELETE FROM Member;";
cmdSQL.ExecuteNonQuery();
txtResult.AppendText("Delete data...OK\n");
// Drop Table
cmdSQL.CommandText = "DROP TABLE Member;";
cmdSQL.ExecuteNonQuery();
txtResult.AppendText("Drop test Table...OK\n");
// Close
conFirebird.Close();
txtResult.AppendText("Close Connection...OK["
+ conFirebird.State.ToString() + " : "
+ FbConnection.ConnectionPoolsCount.ToString()
+ "]\n");
// Clear Pool
FbConnection.ClearPool(conFirebird);
txtResult.AppendText("Clear Connection pool...OK["
+ conFirebird.State.ToString() + " : "
+ FbConnection.ConnectionPoolsCount.ToString()
+ "]\n");
// Drop Database
FbConnection.DropDatabase(connectionString);
txtResult.AppendText("Drop Database...OK\n");
}
catch (FbException ex)
{
//MessageBox.Show("Occured FbException \n" + ex.ToString());
txtResult.AppendText("Occured FbException => Error code : "
+ ex.ErrorCode.ToString() + "\n");
txtResult.AppendText("-------------------------------------------------\n");
txtResult.AppendText(ex.ToString() + "\n");
txtResult.AppendText("-------------------------------------------------\n");
}
catch (Exception ex)
{
//MessageBox.Show("Occured Exception \n" + ex.ToString());
txtResult.AppendText("Occured Exception \n");
txtResult.AppendText("-------------------------------------------------\n");
txtResult.AppendText(ex.ToString() + "\n");
txtResult.AppendText("-------------------------------------------------\n");
}
txtResult.AppendText("End Testing.\n");
Begin Testing...<
Create Database...OK
Create Connection Object...OK[Closed : 0]
Open Connection...OK[Open : 1]
Create test Table...OK
Insert 1row(s)...OK
Insert 1row(s)...OK
Insert 1row(s)...OK
Insert 1row(s)...OK
Insert 1row(s)...OK
Insertion committed...OK
Insert data...OK
ID NAME ALIAS AGE
Man0 Name0 Alias0 10
Man1 Name1 Alias1 11
Man2 Name2 Alias2 12
Man3 Name3 Alias3 13
Man4 Name4 Alias4 14
UPDATE Member SET Age = Age + 20 WHERE Age > 11;
3row(s) updated!
Update data...OK
ID NAME ALIAS AGE
Man0 Name0 Alias0 10
Man1 Name1 Alias1 11
Man2 Name2 Alias2 32
Man3 Name3 Alias3 33
Man4 Name4 Alias4 34
Delete data...OK
Drop test Table...OK
Close Connection...OK[Closed : 1]
Clear Connection pool...OK[Closed : 0]
Drop Database...OK
End Testing.
Original Post : http://neodreamer-dev.tistory.com/579
// #1 Using Thread Sleep method<
Thread.Sleep(5000);
// #2 Using TickCount
public void Delay(int ms)
{
int time = Environment.TickCount;
do
{
if(Environment.TickCount - time >= ms) return;
} while(true)
}
// #3 Using DateTime
public static DateTime PauseForMilliSeconds( int MilliSecondsToPauseFor )
{
System.DateTime ThisMoment = System.DateTime.Now;
System.TimeSpan duration = new System.TimeSpan( 0, 0, 0, 0, MilliSecondsToPauseFor );
System.DateTime AfterWards = ThisMoment.Add( duration );
while ( AfterWards >= ThisMoment )
{
System.Windows.Forms.Application.DoEvents();
ThisMoment = System.DateTime.Now;
}
return System.DateTime.Now;
}
Original Post : http://neodreamer-dev.tistory.com/578
<Window ...><
<DockPanel>
<StatusBar DockPanel.Dock="Bottom">
<StatusBarItem>
<TextBlock Name="statusText">Ready</TextBlock>
</StatusBarItem>
</StatusBar>
:
</DockPanel>
</Window>
Original Post : http://neodreamer-dev.tistory.com/576
Android 머신 설정화면
Android 부팅 메뉴 화면
파티션 선택 화면
파티션 생성 | Primary 설정 | 크기 설정 |
Bootable 설정 | partition 변경 사항 기록 |
filesystem 선택 화면
Grub 설치 확인 화면
/system directory 설치 화면
Android 화면
Windows 8 초기 화면
Windows 8 Desktop 초기 화면
Windows 8 탐색기
Windows 8 메모장
Windows 8 시작 메뉴
Windows 8 Settings
Windows 8 Search
Windows 8 Apps
Windows 8 Log Off
Windows 8 시작 화면
Windows 8 화면 [출처:Preview Guide] | Windows 8 화면 [출처:Preview Guide] |
Windows 8 Desktop 화면 [출처: Preview Guide]