Private oApp As Framework.App Private oProcess As Framework.LXProcessThen, the New() event supports overload such as this:
' This is when we access the data provider in desktop and Web service mode Sub New(ByVal toApplication As Framework.App) oApp = toApplication End Sub ' This is when we access the data provider in a Web mode Public Sub New(ByVal toProcess As Framework.LXProcess) oProcess = toProcess End SubThen, one method of this class is like this:
' Return the field size ' expC1 Table ' expC3 Connection string Public Function GetSchema(ByVal tcTable As String, ByVal tcConnectionString As String) As Boolean Dim loDataProvider As Framework.Data = New Framework.Data(oApp) loDataProvider.nSQLMode = nSQLMode If Not loDataProvider.GetSchemaTable(tcTable, tcConnectionString) Then Return False End If oDataTable = loDataProvider.oDataTable Return True End FunctionHowever, in this method, when loDataProvider is created, the Framework.Data class also supports overloads. So, basically, if I instantiated this class by passing oApp, I need to have the declaration in this method to be:
Dim loDataProvider As Framework.Data = New Framework.Data(oApp)But, if I instantiated this class by passing oProcess, I need to have the declaration in this method to be:
Dim loDataProvider As Framework.Data = New Framework.Data(oProcess)Both lines would work and this is ok. However, in the GetSchema() method, how one would adjust the code to support that?