0

コンソール アプリケーションを使用しています。このアプリケーションでは、sqlite から行全体 (フィールド) を取得し、それをテキスト ファイル (Unicode) にコピーします。

以下のコードから、sqlite に接続し、行全体を選択しています

   class Program
{
    static void Main(string[] args)
    {
        SQLiteConnection connection = new SQLiteConnection(@"Data Source = C:\APTRABuilder.sqlite;Version=3;");
        connection.Open();
        string conncommand = "Select language1 from builderScreenResourceBundleTBL";
        SQLiteCommand cmd = new SQLiteCommand(conncommand, connection);
        cmd.ExecuteNonQuery();
    }
}

そのデータをテキスト ファイルにコピーしたいのですが、どうすればよいですか?

4

1 に答える 1

0
 class Program
{
    static void Main(string[] args)
    {
        SQLiteConnection connection = new SQLiteConnection(@"Data Source = C:\APTRABuilder.sqlite;Version=3;");
        connection.Open();
        string conncommand = "Select language1 from builderScreenResourceBundleTBL";
        SQLiteCommand cmd = new SQLiteCommand(conncommand, connection);
        DataReader dr = cmd.ExecuteReader()
        while(dr.Read())
           {
             //fetch the Rows here.
           }
    }
}
于 2012-12-09T08:18:45.797 に答える