index

블로그 | 정보 | 책세상 | 트래킹 | 일상  | 사진첩 | 영화 | 트위터  | 일정 | 자료실 | ZARD | KEANE | English | 프로젝트 | GP2X | 즐겨찾기 | BBS 

  Auto


   
  sqlite db
  글쓴이 : DNAVI     날짜 : 15-05-25 04:25     조회 : 381    
  트랙백 주소 : http://dnavi.info/bbs/tb.php/visual_C/2
// create db file & connetion

SQLiteConnection.CreateFile("test.db");

SQLiteConnection m_dbconnection;

m_dbconnection = new SQLiteConnection("Data Source=test.db;Version=3;");

m_dbconnection.Open();

 // create table

SQLiteCommand sqlite_cmd;

sqlite_cmd = m_dbconnection.CreateCommand();

sqlite_cmd.CommandText = "CREATE TABLE login ( username varchar(15) primary key, password varchar(15));";

sqlite_cmd.ExecuteNonQuery();

 m_dbconnection.Close();