Page 1 of 1
TUNIScript changes SQL comment style
Posted: Mon 13 Feb 2017 14:39
by Girlbrush
We run our own Database Synching program between two Firebird 3.0 servers. The program takes SQL Statements (DDL and Data) from a sync table and executes them in batches onto then second database.
An issue with this is that it changes SQL comments fromm inline to multiline without prompt
changes to
After which the IBExpert database comparer complains that all our triggers and procedures are different.
And we need them to be 100% equal. Any fix/option for this?
Re: TUNIScript changes SQL comment style
Posted: Mon 13 Feb 2017 15:39
by ViktorV
As the UniDAC library is designed to help develop cross-database applications, therefore it formats SQL to universal form. To disable this functionality you should set the EnableUniSQL global variable from the Uni unit to False. For example:
Code: Select all
initialization
EnableUniSQL := False;
Re: TUNIScript changes SQL comment style
Posted: Tue 14 Feb 2017 13:47
by Girlbrush
Thank you, this solved our problem.
Re: TUNIScript changes SQL comment style
Posted: Tue 14 Feb 2017 13:53
by ViktorV
Thank you for your interest to our product.
If you have any questions during using our products, please don't hesitate to contact us - and we will try to help you solve them.
Re: TUNIScript changes SQL comment style
Posted: Fri 17 Feb 2017 07:31
by Girlbrush
Yes, actually another issue popped up - when there is a call to a stored procedure with a return value (execute procedure...), it would throw an error about expecting a parameter and not getting one.
Since this is a script of many SQL statements that is filled on runtime, we can't know about returnvalues at designtime.
I don't have more details at this point, but maybe it rings a bell?
Re: TUNIScript changes SQL comment style
Posted: Fri 17 Feb 2017 11:55
by ViktorV
MySQL does not support returning output parameters of stored procedures. To workaround this limitation, UniDAC generates code allowing to return output parameters values. What code is generated you can learn, for example, by using the TUniStoredProc component in design-time.
If you want to continue script execution after error occurrence: to avoid showing error messages, you should set the Action parameter in the TUniScript.OnError event handler to eaContinue if you want to continue script execution.
Note: if you run the application from the IDE, and the Stop On Delphi Exception (Notify on language exceptions) option is enabled, an error message will be shown in any way, independently on the Action parameter value; when running the application from *.exe - an error won't be shown ( Action = eaContinue).
Please, refer to the help topic for the TErrorAction enumeration in the UniDAC documentation to learn more about possible Action values.
If you mean something else, please provide a more detailed description of your question or better compose a small sample and send it to us using the contact form
https://www.devart.com/company/contactform.html