Skip to content
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

Process RETURNING and SP output [DNET319] #330

Closed
firebird-automations opened this issue May 31, 2010 · 5 comments
Closed

Process RETURNING and SP output [DNET319] #330

firebird-automations opened this issue May 31, 2010 · 5 comments

Comments

@firebird-automations
Copy link

Submitted by: Konstantin Dombrugov (abracadabra)

Duplicates DNET770

Votes: 1

FirebirdClient does not return output of statements with "RETURNING" and I suspect that SP too.
I've fixed this issue for me but maybe there's a better way and imho this should be in official version.

Solution:
Data\Client\Managed\Version10\GdsStatement.cs
in public override DbValue[] Fetch()
replace
if (this.statementType != DbStatementType.Select &&
this.statementType != DbStatementType.SelectForUpdate)
{
return null;
}
with
if (this.statementType != DbStatementType.Select &&
this.statementType != DbStatementType.SelectForUpdate)
{
if (this.StatementType == DbStatementType.StoredProcedure && !allRowsFetched)
{
allRowsFetched = true;
return this.GetOutputParameters();
}
return null;
}

@firebird-automations
Copy link
Author

Commented by: Andre Litfin (andrelitfin)

Maybe doing this in Data\Client\Managed\Version10\GdsStatement.cs and Data\Client\ExternalEngine\ExtStatement.cs and Data\Client\Native\FesStatement in public override DbValue[] Fetch() would be a good idea:

        if \(this\.StatementType == DbStatementType\.StoredProcedure && \!allRowsFetched\)
        \{
            allRowsFetched = true;
            return this\.GetOutputParameters\(\);
        \}
        else if \(this\.statementType == DbStatementType\.Insert && allRowsFetched\)
        \{
            return null;
        \}
        else if \(this\.statementType \!= DbStatementType\.Select && this\.statementType \!= DbStatementType\.SelectForUpdate\)
        \{
            return null;
        \}

@firebird-automations
Copy link
Author

Modified by: @cincuranet

Link: This issue relate to DNET770 [ DNET770 ]

@firebird-automations
Copy link
Author

Modified by: @cincuranet

Link: This issue duplicates DNET770 [ DNET770 ]

@firebird-automations
Copy link
Author

Modified by: @cincuranet

Link: This issue relate to DNET770 [ DNET770 ] =>

@firebird-automations
Copy link
Author

Modified by: @cincuranet

status: Open [ 1 ] => Closed [ 6 ]

resolution: Duplicate [ 3 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants