VS 2019 WebForms VB-project tableadapter not defined?

143 views Asked by At

I am building a web-forms app in VS-2019. I am trying to use code from VS-2017 that worked with the tableadapters in the schema xsd file. I copied the xsd and xss files into the VS-2019 project. I can see all of my tables and queries (vs-2019 and vs-2017 both point to the same local Sql-DB). However, when I copied a bllVehicle.vb code into the APP_Code folder the VB-code looks good but not TWO sentences with squiggly-lines:

Imports System
Imports System.Data
Imports System.Data.Sql
Imports System.Data.SqlClient
Imports System.Diagnostics
Imports Microsoft.VisualBasic
Imports **FCI_Main_TblAdapTableAdapters**     //' <-- **squiggly lines** (not referenced properly)
s
<System.ComponentModel.DataObject()> Public Class bllVehicle
   ' Class variables.
   Private m_i32UID_LOGIN As Int32
   Private _Vehicle_Adapter As **tVehicleTableAdapter** = Nothing  //'**tLOGINSTableAdapter**' <-- has **squiggly** lines  

It appears that I need to reference the tableadapters but I do not know how.

Can you please help? Thanks...John D.

1

There are 1 answers

1
John D On BEST ANSWER

Excuse me but I found out how to reference the tableadapters in VB.Net WebForms in VS-2019.

I had to change the class method to include the last two missing sentences from the original question: I referenced the current project-name.

Imports System
Imports System.Data
Imports System.Data.Sql
Imports System.Data.SqlClient
Imports System.Diagnostics
Imports Microsoft.VisualBasic

Imports repo_Management.FCI_Main_TblAdapTableAdapters
Namespace repo_Management