DataExchange Class |
Namespace: Omada.OE.UtilityCodeAssembly
public class DataExchange
The DataExchange type exposes the following members.
Name | Description | |
---|---|---|
![]() | DataExchange |
Name | Description | |||||||
---|---|---|---|---|---|---|---|---|
![]() | DataExchangeSqlImport | Obsolete.
The CodeMethod shall take a SQL statement and a SQL connection,
and fetch all the data from the SQL Server and save them to a CSV file,
and upload the CSV file to a new version of a DataExchange file.
The Data Exchange should already have a file attached
Code method configuration must hold database connection and command information as well as the data exchange UId Example of code method configuration: <DataExchangeSqlImport> <CommandText>select a, b, c from tbl_d</CommandText> <ConnectionString>User ID=sa;Initial Catalog=SomeDatabase</ConnectionString> <DataExchangeUid>xxxx-xxxx-xxxx-xxxx-xxxx</DataExchangeUid> </DataExchangeSqlImport> | ||||||
![]() | UploadAndExecute | Obsolete.
Execute a data exchange that is used for importing data from a CSV file
to the current application.
The CSV file can either be located on a server or the local machine.
The function will: 1.Impersonate the client, if his/her username and password are valid for the server of the given domain 2.Compare the give textfile configuration's file version with its matching file with the given path in the server 3.If the server file is newer than the configuration file then create new file version for the data exchange configuration 4.Execute the data exchange Example of a configuration for data exchanging from a file on a remote server: <UploadAndExecute>
<DataExchangeId>1001</DataExchangeId>
<UNCPath>\\Filesrv01\Shared\AppFile\UploadAndExecuteTest.csv</UNCPath>
<Domain>OMADA</Domain>
<Username>sm</Username>
<Password>Superman1</Password>
</UploadAndExecute> Example from a local machine: <UploadAndExecute>
<DataExchangeId>1001</DataExchangeId>
<UNCPath>C:\Temp\UploadAndExecuteTest.csv</UNCPath>
</UploadAndExecute> |
Name | Description | |
---|---|---|
![]() | ToBool |
Converts object to boolean.
(Defined by ObjectExtensions.) |
![]() | ToDateTime |
Converts object to DateTime.
(Defined by ObjectExtensions.) |
![]() | ToInt |
Converts object to integer.
(Defined by ObjectExtensions.) |