Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataSet Designer vb
Message
From
02/03/2010 08:12:20
 
 
To
All
General information
Forum:
ASP.NET
Category:
ADO.NET
Title:
DataSet Designer vb
Environment versions
Environment:
VB 9.0
Miscellaneous
Thread ID:
01451949
Message ID:
01451949
Views:
129
Hi,
When I create dataset designer generates for me tableadapter code where programmatically setup connection string
Now I want to use my userdefined function to initconnection instead function which generate designer for me

For this purpose I create new partial class and create also InitConnection function, Then I delete function from desginer vb code
The problem is.. when I save XSD or build the application designer creates again and again.. and I'v got a compile time error

"Error 11 'Private Sub InitConnection()' has multiple definitions with identical signatures"

The question is - how can I make a SHADOW for designer code
Namespace Dci_datasetTableAdapters

    Partial Public Class ProductsTableAdapter

        Public Sub New(ByVal tcDBFilename As String)
            MyBase.New()
            Dim lcConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & tcDBFilename
            Pmks_connectionstring = lcConnectionString
            Me.ClearBeforeFill = True
        End Sub

        Private _pmks_connectionstring As String
        Public Property Pmks_connectionstring() As String
            Get
                Return _pmks_connectionstring
            End Get
            Set(ByVal value As String)
                _pmks_connectionstring = value
            End Set
        End Property

        Private Shadows Sub InitConnection()
            Me._connection = New Global.System.Data.OleDb.OleDbConnection
            Me._connection.ConnectionString = Pmks_connectionstring 
        End Sub

    End Class

End Namespace
Next
Reply
Map
View

Click here to load this message in the networking platform