Thursday, February 16, 2012

commandtimeout on privat adapter

Hi,
The adapter in an dataset, via generted code in VS2005, is defined private.
How can I set the commantimeout in this case.
For example, this a snipped from generated code on a dataset:
Public Overloads Overridable Function Fill(ByVal dataTable As
dsDeltaV.INTERFACEDataTable) As Integer
Me.Adapter.SelectCommand = Me.CommandCollection(0)
'following line is added manualy, but ofcourse overwritten next time the
generation tool has run:
Me.Adapter.SelectCommand.CommandTimeout = CommandTimeOut
If (Me.ClearBeforeFill = true) Then
dataTable.Clear
End If
Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
Return returnValue
End Function
Hello Bart,
I would like to suggest you add a custom partial class into the project
which is in the same namespace and has same name of your adapter class.
In that partial class, you could add your custom method to refer the
SelectCommand and other protected variable.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

No comments:

Post a Comment