GetSqlQueryResultAsXml
What to use it for | Prerequisites for usage | Essential properties to set |
---|---|---|
|
|
|
<T>
Activities with a <T> will ask you to indicate what the data type is of the data that will be affected. Depending on the data type, you will get a different Template (<T>) with configuration options.
Misc
Option | What is it | How to use it |
---|---|---|
Connection string
| A connection string is a line of code for connecting with and accessing a database. | Write a connection string (see explanation), between double quotes. |
Command type
| The type of SQL query. | Indicate what type of query you will be using:
|
SQL query
| The actual SQL query to request the relevant data from the database. | Enter the SQL query, between double quotes. Use a parameterized query when using a text query, to prevent being vulnerable to SQL injection attacks. |
Parameters
| Instead of hardcoding values in your SQL queries a better way is to use parameters: A parameter is a variable in an SQL query that represents a predefined value. Use the current 'Parameters' option to create these predefined values. | Provide a name for your new variable, and a corresponding value. |
Display name | Name of the Activity. | Leave at the default, or enter a name that is a better reflection of the type of query that is executed. |
Option | What is it | How to use it |
---|---|---|
Local path | File path to XML you want to write the result to. | Enter an absolute path that includes the file name. |
Resulting XML
<?xml version="1.0" encoding="utf-8" ?> <RecordSet> <Record> <Column name="Id" clrType="System.Int64" dbType="bigint">1</Column> <Column name="Name" clrType="System.String" dbType="nvarchar">Jack</Column> <Column name="Age" clrType="System.Int32" dbType="int">51</Column> </Record> <Record> <Column name="Id" clrType="System.Int64" dbType="bigint">2</Column> <Column name="Name" clrType="System.String" dbType="nvarchar">Jill</Column> <Column name="Age" clrType="System.Int32" dbType="int">48</Column> </Record> </RecordSet>