0
내 응용 프로그램에 대한 로컬 데이터베이스를 만들어야합니다. 누군가 나를 도울 수 있습니까? sqlite-net이 아닌 "create table ..."과 같은 쿼리를 사용하여 sql에 쓰기를 원합니다.Windows 전화에서 로컬 데이터베이스 만들기 8.1
내 응용 프로그램에 대한 로컬 데이터베이스를 만들어야합니다. 누군가 나를 도울 수 있습니까? sqlite-net이 아닌 "create table ..."과 같은 쿼리를 사용하여 sql에 쓰기를 원합니다.Windows 전화에서 로컬 데이터베이스 만들기 8.1
SQLite를 SQLite없이 사용할 수 있습니다.
그냥은 Gallery에서 얻을과 같은 물건을 수행
SQLiteCommand command = new SQLiteCommand(connection);
command.CommandText = "CREATE TABLE IF NOT EXISTS beispiel (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, name VARCHAR(100) NOT NULL);";
command.ExecuteNonQuery();
command.CommandText = "INSERT INTO beispiel (id, name) VALUES(NULL, 'Test-Datensatz!')";
command.ExecuteNonQuery();
command.CommandText = "SELECT name FROM beispiel ORDER BY id DESC LIMIT 0, 1";
SQLiteDataReader reader = command.ExecuteReader();
while (reader.Read())
{
Console.WriteLine("Name: \"{p}\"", reader[0].ToString());
}
reader.Close();
reader.Dispose();
command.Dispose();
당신이 나에게 데이터베이스를 생성하기위한 몇 가지 힌트를 줄 수 있습니까? 어디에서 만들 수 있습니까? 방법? – user3906040
샘플을 답안에 추가했습니다. –
나는 연결 SqLiteDateRader 콘솔 폐기 내가 샘플 어쩌면 당신이 (당신은 또한이 좀 더 현재의 샘플을 찾을 수) 최신 문서를 검색한다, 아주 오래 – user3906040