This task requires ODBC drivers to be istalled on FRENDS Agent machine.
You can install the Task via frends UI Task View or you can find the NuGet package from the following NuGet feed https://www.myget.org/F/frends-community/api/v3/index.json and in Gallery view in MyGet https://www.myget.org/feed/frends-community/package/nuget/Frends.Community.Odbc
Query ODBC
Property | Type | Description | Example |
---|---|---|---|
ConnectionString | string | Connection string | DSN=ODBC_testDB |
TimeoutSeconds | int | query timeout | 30 |
Property | Type | Description | Example |
---|---|---|---|
Query | string | Qyery string | SELECT * FROM Customers WHERE Id = ? |
ParametersInOrder | List | List of parameters used in query in order of usage |
Property | Type | Description | Example |
---|---|---|---|
Return type | enum<Json, Xml, Csv> | Data return type format | Json |
OutputToFile | bool | true to write results to a file, false to return results to executin process | true |
Property | Type | Description | Example |
---|---|---|---|
RootElementName | string | Xml root element name | items |
RowElementName | string | Xml row element name | item |
Property | Type | Description | Example |
---|---|---|---|
Culture info | string | Specify the culture info to be used when parsing result to JSON. If this is left empty InvariantCulture will be used. List of cultures Use the Language Culture Name. | fi-FI |
Property | Type | Description | Example |
---|---|---|---|
IncludeHeaders | bool | Include field names in the first row | true |
CsvSeparator | string | Csv separator to use in headers and data items. Note that if you want tu use tabulator as a separator, you need to change the parameter type to expression and specify tabulator by @" " (note the tabulator between quotes) or "\u0009". | ; |
Property | Type | Description | Example |
---|---|---|---|
Path | string | Output path with file name | c:\temp\output.json |
Encoding | string | Encoding to use for the output file | utf-8 |
Object { string Result }
Property | Type | Description | Example |
---|---|---|---|
Result | string |
Output file path or query result | c:\temp\output.json |
Usage: To fetch result use syntax:
#result.Replication
Clone a copy of the repository.
git clone https://github.com/CommunityHiQ/Frends.Community.Odbc.git
Build the project.
dotnet build
Run tests.
dotnet test
Create a NuGet package.
dotnet pack --configuration Release
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
- Fork the repository on GitHub
- Clone the project to your own machine
- Commit changes to your own branch
- Push your work back up to your fork
- Submit a Pull request so that we can review your changes
NOTE: Be sure to merge the latest from "upstream" before making a pull request!
Version | Changes |
---|---|
1.0.0 | Initial version of Query Task |
1.0.1 | Multitargeting .net standard 2.0, .net 471 |
1.0.2 | Fixed version number conflict with Newtonsoft.Json |
1.1.0 | Release ODBC object pool after Task execution |
1.2.0 | Multitargeting added to .NET6 and .NET8. System.ComponentModel.Annotations updated to 5.0.0 and System.Data.Odbc updated to 8.0.0 |