VB.NET Unable to solve error BC30002

Giacomo Raucci 321 Reputation points
2023-07-12T12:00:37.2766667+00:00

While attempting to convert an Excel VBA to VB.NET, got BC30002 error. After reviewing some of the logs, still unable to resolve. Here is some information on my code:

The BC30002 error info is provided below. Statement Line 35 is also provided.In addition, the Imports statements as well. Please let me know if you need any other information. I am currently using Visual Studio 2022. Thank you for your help.
-------
Severity	Code	Description	Project	File	Line	Suppression State
Error	BC30002	Type 'SqlConection' is not defined.	HOHAdminWin	C:\Users\HOH-IT-Admin\source\repos\HOHAdminWin\HOHAdminWin\HOHAdmin.vb	35	Active
------
(1st 7 lines of HOHAdmin.vb)
Option Explicit On
Option Strict On

Imports System
Imports System.Configuration
Imports System.Data.SqlClient
Imports System.Data
Imports System.Data.OleDb
Imports System.Windows.Forms
-----
(line 35) Dim conn As SqlConection
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,888 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,668 questions
{count} vote

Accepted answer
  1. Andy De George 90 Reputation points Microsoft Employee
    2023-07-13T18:17:40.4866667+00:00

    You may be missing the System.Data.SqlClient NuGet package, try adding it.


2 additional answers

Sort by: Most helpful
  1. Viorel 114.7K Reputation points
    2023-07-12T12:18:33.8866667+00:00

    Try this: Dim conn As SqlConnection.

    0 comments No comments

  2. Dewayne Basnett 1,361 Reputation points
    2023-07-13T19:02:09.66+00:00

    Copy and paste this and see what happens

        Dim conn As System.Data.SqlClient.SqlConnection