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 回答