1,从nuget里获取,搜索:system.data.sqlite(system.data.sqlite.core也可以,单文件)
Imports System.Data.SQLite
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim dbPath = "Data Source =" + Environment.CurrentDirectory + "/test.db"
Dim conn = New SQLiteConnection(dbPath) '//创建数据库实例,指定文件位置
conn.Open() '//打开数据库,若文件不存在会自动创建
End Sub
End Class