1

SQLiteのドキュメントを読むと、値を返したり設定したりできるプラグマがあることに気付きました。Pragma table_info(tablename)とPragmapage_sizeを使用したいと思います。Vb.netプログラム内でこれを実行して、2つのプラグマからそれぞれ列とページサイズのリストを取得するにはどうすればよいですか?

編集:

これが情報を取得するコードです。誰かに役立つかもしれないと思っただけです。

 Dim temp = New DataTable
    temp.Clear()

    Using oMainQueryR As New SQLite.SQLiteCommand
        oMainQueryR.CommandText = ("PRAGMA table_info(yourtablename)")
        Using connection As New SQLite.SQLiteConnection(conectionString)
            Using oDataSQL As New SQLite.SQLiteDataAdapter
                oMainQueryR.Connection = connection
                oDataSQL.SelectCommand = oMainQueryR
                connection.Open()
                oDataSQL.Fill(temp)
                connection.Close()
            End Using
        End Using
    End Using

結果のデータテーブルには、行に列と情報があります。

4

1 に答える 1

1

Just use that pragma as you would use a SELECT x FROM y statement.

于 2012-09-22T16:13:29.720 に答える