SetDateTimeParameterByName()
- Last UpdatedOct 13, 2022
- 1 minute read
Use the SetDateTimeParameterByName() method to configure a DateTime parameter by the name encoded into the text of a SQL statement using the @ character.
Syntax
result SetDateTimeParameterByName (
string ParameterName,
object ParameterValue,
aaDBParameterDirection ParameterDirection)
Parameters
ParameterName
The string identifier used in the SQL statement. For example, in the following SQL statement, the name of the parameter is "NewDate"
"INSERT INTO Purchasing.PurchaseOrderDetail
(PurchaseOrderID
,DueDate
,OrderQty
,ProductID
,UnitPrice
,ReceivedQty
,RejectedQty
,ModifiedDate)
VALUES
(4,'2008-01-28',4,4,4,12.89,12.56,@NewDate)"
ParameterValue
The DateTime, string value, or a valid ArchestrA reference string.
For example:
-
'2004-03-11 10:17:21.587'
-
me.dtValue
ParameterDirection
For possible values, see aaDBParameterDirection.
Example
SetDateTimeParameterByName ("NewDate",me.dtValue,aaDBParameterDirection.Input)