Go to Robotic Automation version 22.1 documentation

SQLCommand

Use the SQLCommand when the data source resides in a Microsoft SQL Server database and you want to perform update, insert, or delete commands on the database. The SQLCommand requires SQL Server 7.0 or greater. The SQLCommand wraps .NET’s SQLConnection component. Note you cannot return data using this component.

Specific properties, methods, and events for the component are listed below. For more information, see General Component Properties, Methods, and Events.

 

Properties

Property

Description

Command

The SQL Insert, Update, or Delete statement. Here is an example:

Insert into AQM (AgentID, start, StartStatus, stop, StopStatus, Annotation, AnnotationStatus) Values (AgentID, 'StartDate','StartStatus', getdate(), 'Today', 'Call Recorded', 'True')

Note: Include single quotes with string variables as 'var'.

When you use a statement containing variables, input data ports will appear on the Execute connection block. Here is an example:

ConnectionString

The string used to open the data source. To create the Connection String, browse this property to open the Connection String Editor window. Here is an example:

In this case the connection string entered was:

Server=".";Initial Catalog="AQM";User Id=sa;Password=

Once you have entered a connection string, click the Test button to verify the connection.

 

Methods

Method

Description

Parameters

Result Type

Execute

The Execute method design block is displayed on the automation when you add the SQLCommand component. Trigger the method to execute the command.

As required by Command

Void

 


Privacy | Trademarks | Terms of Use | Feedback

Updated: 01 July 2024

© 2016 - 2024 Pegasystems Inc.  Cambridge, MA All rights reserved.

 

OpenSpan data classification label