I'd like to create an SQL statment within data enviroment
which is dynamic such as changing the date, and for that
I need to use the parameters. Does anyone know how to create
a parameter in Data Enviroment???
Printable View
I'd like to create an SQL statment within data enviroment
which is dynamic such as changing the date, and for that
I need to use the parameters. Does anyone know how to create
a parameter in Data Enviroment???
Let me try to help you.
When you have created a connection. you have to
make then a command under it. go to the properties
of the command. set by the (SQL statement) your
sql string. end let it end with a char (?).
example :
select [date] from database where [date]=?
When you want to use a date parameter. define it
by the parameter tab. You see in the parameter list
(para1). select it. when you have selected the parameter
you see left of this form the properties of the parameter
Select by the combobox (data type) = adlUnknown.
and select by the combobox (host data type) = Date (VT_DATE)
When you have done this. click ok.
And you want to give the command a parameter in code.
example line.
Now you have created a parameter with it.Code:DataEnvironment.command cdate("01-01-2000")
-Kayoca Mortation