Isn't that what I suggested ?
>By quick google I found
http://www.c-sharpcorner.com/Forums/ShowMessages.aspx?ThreadID=37243, not sure if helpful.
>
>>>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
>>
>>I don't think you can.
>>IIRC one simple solution is to set the ConnectionModifier property of the TableAdapter to Public in the designer. That should allow you to access it directly in the constructor.
>>(This from some sort of race memory so I could be wrong :-}
>>>
>>>
>>>
>>>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
>>>