vb.net如何操作sqlite数据库 15
TryDimconnAsNewSystem.Data.SQLite.SQLiteConnection(SqliteStr)DimcmdAsNewSQLiteCommand...
Try
Dim conn As New System.Data.SQLite.SQLiteConnection(SqliteStr)
Dim cmd As New SQLiteCommand("SELECT * FROM Jinkou", conn)
conn.Open()
Dim ds As New DataSet()
Dim da As New SQLiteDataAdapter(cmd)
da.Fill(ds) ‘在些处报错,报formatException
conn.Close()
dg.DataSource = ds
Dim counts As New Integer
counts = dt.Rows.Count()
lbl合计.Text = "共:【" + counts.ToString() + "】条数据"
Catch ex As SqlException
MsgBox(ex.Message)
Catch ex As Exception
MsgBox(ex.Message) ’异常抛到这里
End Try
求各位大神给出解决方案 展开
Dim conn As New System.Data.SQLite.SQLiteConnection(SqliteStr)
Dim cmd As New SQLiteCommand("SELECT * FROM Jinkou", conn)
conn.Open()
Dim ds As New DataSet()
Dim da As New SQLiteDataAdapter(cmd)
da.Fill(ds) ‘在些处报错,报formatException
conn.Close()
dg.DataSource = ds
Dim counts As New Integer
counts = dt.Rows.Count()
lbl合计.Text = "共:【" + counts.ToString() + "】条数据"
Catch ex As SqlException
MsgBox(ex.Message)
Catch ex As Exception
MsgBox(ex.Message) ’异常抛到这里
End Try
求各位大神给出解决方案 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询