Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataSet Designer vb
Message
De
02/03/2010 08:12:20
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Titre:
DataSet Designer vb
Versions des environnements
Environment:
VB 9.0
Divers
Thread ID:
01451949
Message ID:
01451949
Vues:
130
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform