New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot create or alter stored procedure with NUMERIC(15,5) in Dialect 1 database via ExecuteImmediate, but can via DSQL [CORE3985] #1462
Comments
Commented by: @jasonwharton Unzip this to any directory and a folder called IBOBadNumeric will be created there. |
Modified by: @jasonwhartonAttachment: IBOBadNumeric.zip [ 12260 ] |
Commented by: @jasonwharton This is the error that appears for me. |
Modified by: @jasonwhartonAttachment: screenshot-1.jpg [ 12261 ] |
Commented by: @jasonwharton This is a text dump of the SQL trace of the exact exchanges that took place leading up to the problem. |
Modified by: @jasonwhartonAttachment: IBOBadNumeric_SQLTraceDump.txt [ 12262 ] |
Commented by: @asfernandes I cannot test with Windows executable connecting to local server. What is the client dialect (looks like 3)? What is the dialect used in isc_dsql_execute_immediate? What is a "normal DSQL statement" (I suppose isc_dsql_prepare). What is the dialect used in this call? |
Commented by: @jasonwharton Yes, correct. I should have said with a database created as Dialect 1 but when connecting at Dialect 3. My main interest is in pointing out how there is a difference between execute immediate and DSQL. |
Commented by: @asfernandes Jason, prepare, execute, execute immediate functions has all a "dialect" parameter. Behavior may depend on the dialect used in the calls (not only the client one). |
Commented by: @jasonwharton Yes, I confirmed that this is the situation: Database itself is created with Dialect 1. The DSQL works just fine. I will create a revised Executable that will allow you to use a remote connection. |
Commented by: @jasonwharton I have a new report. It's possible that this statement failing is intended behavior. In which case, feel free to close this issue as resolved. Thanks for your time and attention. |
Commented by: @asfernandes Yes, the error is intended. |
Commented by: @dyemanov I'd say this is absolutely expected. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: @jasonwharton
Attachments:
IBOBadNumeric.zip
screenshot-1.jpg
IBOBadNumeric_SQLTraceDump.txt
I have a case where I can execute a statement via a normal DSQL just fine, but it fails when I take the same statement and execute it via the API's execute immediate facility.
Here is the statement:
CREATE OR ALTER PROCEDURE BAD_NUMERIC
(
BAD_IN NUMERIC(15,5)
)
RETURNS
(
BAD_OUT NUMERIC(15,5)
)
AS
BEGIN
END;
I will also attach a demo app that will enable a quick look. Just select the method to execute the statement through and click execute and it will either succeed or an exception will be raised.
The text was updated successfully, but these errors were encountered: