Problem with Stored Procedure (2005-2010)
Posts: 51
Joined: 06 Jun 2017, 13:10
Location: Munich

Problem with Stored Procedure

Post by ra_ga » 05 Feb 2010, 13:46

 Posted by:  Rainer Gareis 

Hi all,

I have a problem with a stored procedure. When I execute the procedure,
the selected ID is shown in the server console (so it seems the
procedure is working) but I don't get the data in my application.

SB 11.0.2
TD 5.1 SP6

My call in TD:
Set dfTxt1 = '\'%' || sSuchtext || '%\''
If SqlRetrieve( hSqlGlobal, 'SYSADM.PRUEFPLANID', ':dfTxt1, :dfTxt2',
Call SqlExecute( hSqlGlobal )
Return dfTxt2

String: sName
Receive String: sPruefplanid

Local Variables
Sql Handle: hSqlCur1
Number: nFetch
string: sPlanID
long string: sAbfrage
string: sTrace
On Procedure Execute
Set sTrace = 'Execute'
Trace sTrace
Set sAbfrage = 'Select distinct @datetochar (pplanident, \'yyyy-mm-dd\') from sysadm.spc_plan
where @Upper (Teil) like ' || sName || ' into :sPruefplanid '
Trace sAbfrage
Call SqlConnect( hSqlCur1 )
Call SqlPrepareAndExecute ( hSqlCur1, sAbfrage )
Set sTrace = 'Fetch'
Trace sTrace
if SqlFetchNext (hSqlCur1, nFetch)
Set sPlanID = sPruefplanid
Trace sPlanID
Return 0
Return 1
On Procedure Close
Call SqlDisconnect( hSqlCur1 )

Any hint is appreciated

Best regards

Return to “td.development”

Who is online

Users browsing this forum: [Ccbot] and 0 guests