Element Details: SQL+Parameter
 Back


Available in: Logi Info Source code name: SqlParameter

SqlParameters specify the parameters for a parameterized SQL statement. Here's an OLEDB example that accepts two parameters:

SELECT * FROM Customers WHERE State=? AND City=?

Different connection types work with different syntax. The examples below show how parameters should be represented in the SQL command if the parameter name is "myName". On some database systems names are case sensitive.

OLEDB = ?
SqlServer = @myName
Oracle = :myName
PostgreSQL = :myName
DB2 = @myName
Sybase = @myName
MySQL = ?myName

If using Java with MySQL or PostgreSQL use the following syntax.
MySQL = ?
PostgreSQL = ?

When using "?", be sure to set create SqlParameters in the same order as they appear in the SQL command.

SqlParameters do not work with ODBC connections.



ATTRIBUTES

Click attribute Name to drill down for more information.

NamePossible ValuesDescription
ID
UserDefined
The ID attribute is a pervasive attribute that uniquely identifies an element within a definition file. The ID needs to be a unique value within the definition.
SqlParamType
dt-8
dt-72
dt-7
dt-64
dt-6
dt-5
dt-4
dt-3
dt-21
dt-205
dt-204
dt-203
dt-202
dt-201
dt-200
dt-20
dt-2
dt-19
dt-18
dt-17
dt-16
dt-14
dt-139
dt-135
dt-134
dt-133
dt-132
dt-131
dt-130
dt-129
dt-12
dt-11
dt-0
(Required) The data type of a parameter for a parameterized SQL command.
Value
UserDefined
(Required) A value for the element.



PARENT ELEMENTS

Click element to drill down for more information.

SQL Parameters


CHILD ELEMENTS

Click element to drill down for more information.



 Back to top