.Net Application to Query MS SQL Database
Budget: £20 – £250 GBP
We require a vb.net application to query a MS SQL Database. Will need to query 3 different databases and each database has different various queries that need to be executed. Connection to the SQL Server must be via Trusted_Connection. Various settings must be stored in a configuration file.
Queries will need to be executed in the order they are listed. FROM and TO dates must be replaced, FROM_DATE will equal LAST_RUN_DATE minus 24hours and TO_DATE will be current date and time. LAST_RUN_DATE must be updated.
Query can be posted to a URL and saved as files on the system with both needing the option of either CSV or XML formatting. When dealing with the result of the queries, need to properly deal with escaping special characters.
When posting to an address, need to keep a log of whether it was successful or not.
EXAMPLE SETTINGS FILE
connection:
SERVER: 'sage200'
Trusted_Connection: TRUE/FALSE
database:
1: 'DATABASE1_NAME'
2: 'DATABASE2_NAME'
3: 'DATABASE3_NAME'
queries:
QUERY1: "SELECT * FROM SYSCountryCode WHERE SYSCountryCode.DateTimeCreated >= '{{FROM_DATE}}' AND SYSCountryCode.DateTimeCreated < '{{TO_DATE}}'"
QUERY2: "SELECT * FROM StocktakeType"
QUERY3: "SELECT * FROM StocktakeSelector"
QUERY4: "SELECT * FROM AnalysisCodeValue WHERE AnalysisCodeValue.DateTimeCreated >= '{{FROM_DATE}}' AND AnalysisCodeValue.DateTimeCreated < '{{TO_DATE}}' AND AnalysisCodeValue.AnalysisCodeID IN(SELECT AnalysisCode.AnalysisCodeID FROM AnalysisCode)"
variables:
LAST_RUN_DATE: '09/23/2022' (mm/dd/yyyy)
output:
file:
enable: TRUE/FALSE
location: 'C:\Documents\{{DATABASE_KEY}}\{{QUERY_KEY}}\{{QUERY_KEY}}_{{EPOCH_TIME}}.{{TYPE}}'
type: CSV/XML
post:
enabled: TRUE/FALSE
address: 'https://example.com/address/{{DATABASE_KEY}}/{{QUERY_KEY}}'
type: CSV/XML
Queries will need to be executed in the order they are listed. FROM and TO dates must be replaced, FROM_DATE will equal LAST_RUN_DATE minus 24hours and TO_DATE will be current date and time. LAST_RUN_DATE must be updated.
Query can be posted to a URL and saved as files on the system with both needing the option of either CSV or XML formatting. When dealing with the result of the queries, need to properly deal with escaping special characters.
When posting to an address, need to keep a log of whether it was successful or not.
EXAMPLE SETTINGS FILE
connection:
SERVER: 'sage200'
Trusted_Connection: TRUE/FALSE
database:
1: 'DATABASE1_NAME'
2: 'DATABASE2_NAME'
3: 'DATABASE3_NAME'
queries:
QUERY1: "SELECT * FROM SYSCountryCode WHERE SYSCountryCode.DateTimeCreated >= '{{FROM_DATE}}' AND SYSCountryCode.DateTimeCreated < '{{TO_DATE}}'"
QUERY2: "SELECT * FROM StocktakeType"
QUERY3: "SELECT * FROM StocktakeSelector"
QUERY4: "SELECT * FROM AnalysisCodeValue WHERE AnalysisCodeValue.DateTimeCreated >= '{{FROM_DATE}}' AND AnalysisCodeValue.DateTimeCreated < '{{TO_DATE}}' AND AnalysisCodeValue.AnalysisCodeID IN(SELECT AnalysisCode.AnalysisCodeID FROM AnalysisCode)"
variables:
LAST_RUN_DATE: '09/23/2022' (mm/dd/yyyy)
output:
file:
enable: TRUE/FALSE
location: 'C:\Documents\{{DATABASE_KEY}}\{{QUERY_KEY}}\{{QUERY_KEY}}_{{EPOCH_TIME}}.{{TYPE}}'
type: CSV/XML
post:
enabled: TRUE/FALSE
address: 'https://example.com/address/{{DATABASE_KEY}}/{{QUERY_KEY}}'
type: CSV/XML