2

1 つの挿入クエリから 2 つの異なる sqlite テーブルに異なる値を挿入したかったのです。

4

1 に答える 1

1

なぜ2行でできないのですか?? プログラムが次々と実行されます。

以下のようなことができます

dbHelper = new RdmsDbAdapter(SDCardVideoActivity.this);
dbHelper.open();
dbHelper.executeSQL("CREATE TABLE IF NOT EXISTS videos(urls text)");
dbHelper.executeSQL("insert into videos values ('"+outputfilepathVideo+"', '"+IncidentFormActivity.incident_id+"')");
dbHelper.executeSQL("CREATE TABLE IF NOT EXISTS audios(urls text)");
dbHelper.executeSQL("insert into audios values ('"+outputfilepathAudio+"', '"+IncidentFormActivity.incident_id+"')");
dbHelper.close();

Android での処理方法については、こちらsqliteをご覧ください。

于 2013-03-11T10:46:22.063 に答える