efcore icon indicating copy to clipboard operation
efcore copied to clipboard

SqliteDataAdapter' is not defined

Open rpmccabe-cell opened this issue 2 months ago • 1 comments

Bug description

Using VB.NET, Visual Studio Community 18.1.0, the Microsoft.Data.Sqlite NuGet package, and are receiving BC30002: Type 'SqliteDataAdapter' is not defined.

Your code

Imports Microsoft.Data.Sqlite
Imports System.Data

Public Class ToolBoxConnection

    Private Sub ToolBoxConnection_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        LoadDataToDataGridView()
    End Sub
    Private Sub LoadDataToDataGridView()
        SqliteCommand1.Connection = SqliteConnection1
        Try
            Dim adapter As New SqliteDataAdapter(SqliteCommand1)
            Dim dataTable As New DataTable()
            adapter.Fill(dataTable)
            ' This is the line that fills the grid at runtime.
            BindingSource1.DataSource = dataTable
            DataGridView1.AutoGenerateColumns = False ' Must be false if manually adding columns
            DataGridView1.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells)
        Catch ex As Exception
            ' ... (Error handling)
        End Try
    End Sub


End Class

Stack traces


Microsoft.Data.Sqlite version

10.00.0

Target framework

10

Operating system

No response

rpmccabe-cell avatar Dec 10 '25 21:12 rpmccabe-cell

I'm a bot. Here are possible related and/or duplicate issues (I may be wrong):

  • https://github.com/dotnet/efcore/issues/13838
  • https://github.com/dotnet/efcore/issues/21311

MihuBot avatar Dec 10 '25 21:12 MihuBot