Dim conn As the New System. Data. SQLite. SQLiteConnection (SqliteStr)
Dim CMD As New SQLiteCommand (" SELECT * FROM Jinkou ", conn.)
Conn. The Open ()
Dim ds As New DataSet ()
Dim da As New SQLiteDataAdapter (CMD)
Da. The Fill (ds) 'error in some place, the formatException
Conn. Close ()
Dg. The DataSource=ds
Dim counts As New Integer
Counts=dt. Rows. The Count ()
LBL combined. The Text="total: [" + counts. The ToString () +"] article data "
Catch the ex As SqlException
MsgBox (ex. Message)
Catch the ex As Exception
MsgBox (ex. Message) exception here
'End the Try
Please everyone a great god given solution
CodePudding user response:
Dt which come of?CodePudding user response:
Da. The Fill (ds) directly Fill the table da. Here the Fill (dt), main: do you have any questions or see you out of the AdapterWords Dim counts As New Integer such also,,,
CodePudding user response:
Part of the code
Dim mSQL As String="Select * from" & amp; MTableName
MDataAdapter. SelectCommand=New SQLiteCommand (mSQL, SQLiteConn)
MTable=New DataTable
DataGrid1. DataBindings. The Clear ()
DataGrid1. The DataSource=Nothing
DataGrid1. Refresh ()
MDataAdapter. The Fill (mTable)
DataGrid1. The DataSource=mTable