Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread DataSet parameter DefaultValue question
Mon, Jan 9 2017 2:18 PMPermanent Link

Trinione

Why does this work:

SELECT * FROM Sales
WHERE (dateEntered >= DATE {dateFrom='2017-01-09'}) AND (dateEntered <= DATE {dateTo='2017-01-09'})
ORDER BY salesNumber DESC


But, the following does not?

SELECT * FROM Sales
WHERE (dateEntered >= DATE {dateEnteredFrom}) AND (dateEntered <= DATE {dateEnteredTo})
ORDER BY salesNumber DESC

Isn't the DefaultValue optional?
Mon, Jan 9 2017 4:08 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

What do you mean by "work" and "does not" ?  Is this at run-time or design-time in the Database Manager ?

Tim Young
Elevate Software
www.elevatesoft.com
Mon, Jan 9 2017 5:59 PMPermanent Link

Trinione

Tim Young [Elevate Software] wrote:
<< What do you mean by "work" and "does not" ?  Is this at run-time or design-time in the Database Manager ?>>

"work" and "does not" means I get an error message when I try to Preview in the 'Editing dsName DataSet' window. And, if I drop a dataset from the Database Manager onto a form an error message appears alerting me to an error in the SQL.

Design-time. This has always been the case hence I am in the habit of populating the DefaultValue with a random 'never to be used' value as in this example.
Wed, Jan 11 2017 2:29 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com


<< "work" and "does not" means I get an error message when I try to Preview in the 'Editing dsName DataSet' window. And, if I drop a dataset from the Database Manager onto a form an error message appears alerting me to an error in the SQL.

Design-time. This has always been the case hence I am in the habit of populating the DefaultValue with a random 'never to be used' value as in this example. >>

This has already been fixed for 2.06 - EWB now uses a NULL parameter to eliminate these issues.

Tim Young
Elevate Software
www.elevatesoft.com
Image