Extremely annoying error message, occurs both in P5 and Windev itself.
Script runs correctly once, then get this error on code like this:
dsAusWages is Data Source
sQuery is string = [
Select
cast(' ' as text) as ChequeNumber,
cast(' ' as text) as PaymentDate,
cast(' ' as text) as Name,
cast(' ' as text) as PayCategoryName,
cast(' ' as text) as PayCategoryType, -- Wage, Entitlement, Super, Tax
000000.0000 as PayHours,
000000.0000 as PayRate,
00000000.00 as PayAmount
From txtTable
Where 1=2 -- get structure only
]
HExecuteSQLQuery(dsAusWages,HFCS_Connection,sQuery) // ERROR HERE 2ND TIME AROUND
Query runs OK in HFSQL control centre.
Solution - add this line after the data source is no longer required:
HCancelDeclaration(dsAusWages)
This command is said to free the resources of a query after calling HExecuteSQLQuery
Tested so far on a script with only one data source.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article