SQLiteConnection cn = new SQLiteConnection(Form1.dbQuery);
cn.Open();
string SQL;
SQL = "SELECT users_id, name, username, place FROM users";
SQLiteCommand cmd = new SQLiteCommand(SQL, cn);
SQLiteDataAdapter da = new SQLiteDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
DataTable dt = ds.Tables[0];
this.grid_userlist.DataSource = dt;
cn.Close();
'Programming > C#' 카테고리의 다른 글
DataTable에서 데이터 삭제 (0) | 2011.06.03 |
---|---|
DataTable에 데이터 추가 (0) | 2011.06.03 |
DataGridView와 ContextMenu 연결 (0) | 2011.05.16 |
DataGridView와 sqlite 테이블 연결하기 (0) | 2011.05.16 |
MDI 창 만들기 (0) | 2011.05.16 |