For the complete documentation index, see llms.txt. This page is also available as Markdown.

ExecuteQueryToFile

Frends Task for executing Microsoft SQL queries into a file.

Task version: 2.3.0

Required Frends version: 5.5+

Required .NET version: 6.0

Compatible Agents: Crossplatform

Task Parameters

Name
Description

Query : String

Query to execute.

Default: - Example: SELECT * FROM table

QueryParameters : SqlParameter[]

Query parameters.

Default: - Example: [ { Name = test, Value = test_value, SqlDataType = SqlDataTypes.Auto } ]

🗝ConnectionString : String

Database connection string.

Default: "Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;" Example: Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;

OutputFilePath : String

Output file path.

Default: - Example: C:\path\tp\file.csv

Task Result

Name
Description

EntriesWritten : Int32

Amount of entries written. Example: 2

Path : String

Path to the file. Example: C:\test.csv

FileName : String

Name of the file. Example: test.csv

Task Changelog

Changelog for Task Frends.MicrosoftSQL.ExecuteQueryToFile.

[2.3.0] - 2026-01-30

Fixed

  • Fixed an issue that was causing problems with Frends processes' cleanup and assembly unloading.

[2.2.0] - 2026-01-22

Changed

  • Improve execution of async methods.

[2.1.0] - 2024-12-16

Added

  • Added Microsoft.SqlServer.Types dependency so that SqlGeography and SqlGeometry typed objects can be handled.

[2.0.0] - 2024-08-05

Changed

  • [Breaking] The task now uses Microsoft.Data.SqlClient instead of System.Data.SqlClient.

[1.0.1] - 2024-02-12

Fixed

  • Fixed handling of null query parameters by changing the parameter value to DBNull.Value.

[1.0.0] - 2024-02-07

Changed

  • Initial implementation

Last updated

Was this helpful?