Home > database >  For help, PB6.5 how to connect more than one result set! Urgent, urgent, urgent!!!!!!!!!!!!
For help, PB6.5 how to connect more than one result set! Urgent, urgent, urgent!!!!!!!!!!!!

Time:09-27

I had a stored procedures written in SQL server, because the process need, middle may return 2 or 3 result sets, I can't use DECLARE and FETCH, is there a way, which master to help me

CodePudding user response:

Written list again to get it

CodePudding user response:

1. Build table
More than 2. The stored procedure

CodePudding user response:

Have to have this kind of circumstance, can dynamically create the DW object,,,

CodePudding user response:

Can you speak a little bit in detail, thank you

CodePudding user response:

Dynamically create refer to:
Ls_newsyntax=sqlca. Syntaxfromsql (ls_sql, 'style (type=grid)', ls_errsyntaxfromSQL)

Syntaxfromsql method,,,

CodePudding user response:

The ls_sql this select statement how to write,
Ls_sql="select @ ls_errd=: ls_errd from yb_sk where @ ls_zlkh", is it?
And the returned result sets the number of columns is different also, what should I do?

CodePudding user response:

I stored procedure is due to a process problem, different stored procedure call in the middle, so for this kind of result

CodePudding user response:

Using DW can only get one specific, using a cursor is also very trouble, at least every record set at the same column, or ADO.NET good, a lot of ways beyond the DW

CodePudding user response:

refer to 6th floor zxkelly24 response:
that ls_sql this select statement of how to write,
Ls_sql="select @ ls_errd=: ls_errd from yb_sk where @ ls_zlkh", is it?
And the returned result sets the number of columns is different also, what should I do?


Ls_sql splicing into SQL string,
For example,

String ls_data='https://bbs.csdn.net/topics/abc'
Ls_sql="select * from yb_sk where ZLKH='" + ls_data +"'"

CodePudding user response:

Didn't know what you mean, what is your "result set"? What is the relationship between return variable number? Statement a few more is the output parameter
I call a stored procedure generally
By transaction
1, create a new transaction object such as uo_procedure
2, in local external functions provides right-click paste sepcial - & gt; SQL - & gt; Each stored procedure declaration in the remote stroed procedure
3, add the transaction object to the application of the properties in the sqlca
4, the program calls directly in the sqlca. Stored procedure name (parameters,.. ) call