Phoenix的天空
Any Program
在app.config中修改:
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />

  </startup> 

 

然后: 

        Dim SQLconnect As New SQLite.SQLiteConnection()

        Dim SQLcommand As SQLiteCommand
        SQLconnect.ConnectionString = "Data Source=:memory:;Version=3;New=true"
        SQLconnect.Open()
        SQLcommand = SQLconnect.CreateCommand
        SQLcommand.CommandText = "CREATE TABLE foo(title TEXT, description TEXT)"
        SQLcommand.ExecuteNonQuery()
        SQLcommand.CommandText = "INSERT INTO foo (title, description) VALUES ('This is a title', 'This is a Description')"
        SQLcommand.ExecuteNonQuery()
        SQLcommand.CommandText = "SELECT * FROM foo"
        Dim SQLreader As SQLiteDataReader = SQLcommand.ExecuteReader()
        While SQLreader.Read()
            MessageBox.Show(SQLreader.Item(0).ToString)
        End While
        SQLcommand.Dispose()
        SQLconnect.Close()
posted on 2011-06-08 17:27  Phoenix Huang  阅读(1789)  评论(4编辑  收藏  举报