como se hace esto? Me pueden ayudar por favor.
Pongo el código de como lleno mi datagrid.
Código vb:
Ver original
Imports System Imports System.Data Imports System.IO Imports System.Data.SQLite Imports System.Windows.Forms.SystemInformation Public Class Form5 Dim cnnl As New SQLiteConnection Public consulta As String Dim Ada As New SQLiteDataAdapter() Private Sub Form5_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim mySql As String cnnl = New SQLiteConnection("Data Source=\BACKUP\BD\CLAS_MOBILE.db;Version=3;") cnnl.Open() mySql = "SELECT * FROM INS_INSPECCIONES_MOBILE_TMP" DataGrid1.DataSource = RecogerConsulta(mySql) End Sub Public Function RecogerConsulta(ByVal mySql As String) As DataTable Dim tmpTable As New DataTable Try Ada = New SQLiteDataAdapter(mySql, cnnl) Ada.Fill(tmpTable) Catch ex As Exception MessageBox.Show(ex.Message, "Error") End Try Return tmpTable End Function End Class
Desde ya muchas gracias.