Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Tparam at runtime
Tue, Mar 3 2009 8:32 AMPermanent Link

randyt
Could someone post an example of using query.params.paramcreate() at runtime. Can't seem
to get it right.
thanks
randy
Tue, Mar 3 2009 9:03 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

randyt


What are you actually trying to do?

From the OLH about the TParam object

Note:
Parameters for datasets that represent queries are only created by specifying parameters in the SQL statement. The TParam objects in such as dataset's Params property are created automatically when parameter tokens are added to the SQL statement.

So if my interpretation is right you can't do what you're trying to do. If you're trying to create an sql statement with parameters its as simple as


SELECT
_Date,
CAST((CURRENT_DATE - _Date) DAY AS INTEGER)
_Dialings,
_Connected,
_Positive,
_Negative,
_Score
FROM UserStats
WHERE
_fkStaff = :UserID
AND
(CURRENT_DATE - _Date)  DAY <= :Readings
ORDER BY _Date

:Readings is the parameter. You'll need to call query.prepare before trying to access it.

If on the other hand I'm trying to teach my granny to suck eggs - sorry.

Roy Lambert [Team Elevate]
Image