Welcome! Log In Create A New Profile

Advanced

WD24 Data Source Warning

Posted by cabinetman 
WD24 Data Source Warning
March 29, 2019 06:02PM
Hello All,

Upgraded a app from 23 to 24 and found that old code did not work any more.

v23 the data source in ExecuteSQLQuery would allow string or variable in v24 string throws an error
dsMyQuery is Data Source
sSql is string 
IF HExecuteSQLQuery("dsMyQuery",:m_ConnectionName,hQueryWithoutHFCorrection,sSql) THEN

v24
dsMyQuery is Data Source
sSql is string 
IF HExecuteSQLQuery(dsMyQuery,:m_ConnectionName,hQueryWithoutHFCorrection,sSql) THEN

From the Help
<Query Name>: Character string (with or without quotes) or data source

DW
Re: WD24 Data Source Warning
March 30, 2019 07:55PM
Hi,

When using a string as data source in a query, I wouldn't know how to address the items in the query.
I usually use a string in a delete query as a dummy, since I have no need for the data source.
So just use a data source as an object not as a string, you will benefit from automatic syntax checks and AAF on the items when using a predefined query.
Perhaps using a string is no longer allowed due to a new feature that I'm not aware of right now.
The Help is not always updated correctly.

Regards,
Piet
Thilo Rieger
Re: WD24 Data Source Warning
March 30, 2019 09:36PM
Hi,

it seems Ok.

You are using a Data Source Object Variable that can not be typed in quotes.

If you use a String to identify the Query then you can use the other forms even with quotes

Thilo
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: