Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
All,

I have created a sample vb.net Web Forms application using Visual Studio 2017.
I have connected to my database called BLIS no problem. My big issue is when I have created a basic Dataset, then created a class to connect to the table adapter, the table is called league, and the table adapter is called leagueTableAdapter, this is using all the basic, run of the mill functionality, nothing special.

When I declare the table adapter, I get an error say about "Public Sub New(): Not most Specific.

Here is the code:
Imports BLIS
Imports BLISTableAdapters
Imports Microsoft.VisualBasic
Imports System.Data

Public Class League

Private _LeagueAdapter As leagueTableAdapter = Nothing

Protected ReadOnly Property Adapter() As leagueTableAdapter
Get
If _LeagueAdapter Is Nothing Then
_LeagueAdapter = New leagueTableAdapter() ' This is where the error is
End If

Return _LeagueAdapter
End Get
End Property

End Class

I would appreciate any guidance on this, thanks

What I have tried:

I have reviewed the Class View and the tableadapter is listed.
I have used the same code in other apps, but I seem to be missing something here.
Posted
Updated 15-Aug-19 9:10am
v2
Comments
Richard Deeming 15-Aug-19 13:22pm    
Post the exact error message.

1 solution

Private _LeagueAdapter As leagueTableAdapter = New leageTableAdapter

Or, create it in your constructor, instead of the getter.

Just because.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900