첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170
using System;
using System.Data.SQLite;

string connectionString = "Data Source=c:\\test.db;Version=3"

using(SQLiteConnection connection = new SQLiteConnection(connectionString))
{
    connection.Open();

    string sql = "SELECT ID, Name, Grade FROM Student ORDER BY Name";

    SQLiteCommand command = new SQLiteCommand(sql, connection);

    SQLiteDataReader reader = command.ExecuteReader();

    while(reader.Read())
    {
        Console.WriteLine("ID={0}, Name={1}, Grade={2}", reader["ID"], reader["Name"], reader["Grade"]);
    }
}
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요