Hi,
I try to call a SQL stored procedure from an InTouch (IT) script (IT v9.5)
It works fine to call the stored procedure, and the actions are executed in SQL.
But the problem is that the value (1 row of 1 value) returned by the stored is not received by IT. I means that after the call, the IT Tag configured in the bind list is not affected.
My SQL stored procedure :
CREATE PROCEDURE [dbo].[AjoutVal]
@pValue REAL ,
@pComment CHAR(30)
AS
INSERT IGNORE INTO TableTest
(ValeurProcess,Commentaire)
VALUES
(@pValue,@pComment)
SELECT "ValeurProcess"=@pValue
GO
My Intouch script :
TagResultCode = SQLSetStatement( ConnID#PMDMotLog, "EXEC dbo.AjoutVal "+StringFromReal( dsBE210\reDebTbAct , 1, "f" )+",'AjoutVal Ă "+$TimeString+"'");
TagResultCode =SQLExecute( ConnID#PMDMotLog , "BindListTableTest1", 0 );
SQLFirst( ConnID#PMDMotLog ) ;
The bind list BindListTableTest1 contains the connection :
Tag1 <--> "ValeurProcess"
When executing, the IT Logger gives the following error :
-1011: No Rows were selected
Furthermore, the stored procedure gives back the good result when it is called localy in the SQL request analyser.
*******
So, is it possible to get the result from a stored procedure in InTouch ??
Or what do I wrong ??
Thanks,
Pascal
I try to call a SQL stored procedure from an InTouch (IT) script (IT v9.5)
It works fine to call the stored procedure, and the actions are executed in SQL.
But the problem is that the value (1 row of 1 value) returned by the stored is not received by IT. I means that after the call, the IT Tag configured in the bind list is not affected.
My SQL stored procedure :
CREATE PROCEDURE [dbo].[AjoutVal]
@pValue REAL ,
@pComment CHAR(30)
AS
INSERT IGNORE INTO TableTest
(ValeurProcess,Commentaire)
VALUES
(@pValue,@pComment)
SELECT "ValeurProcess"=@pValue
GO
My Intouch script :
TagResultCode = SQLSetStatement( ConnID#PMDMotLog, "EXEC dbo.AjoutVal "+StringFromReal( dsBE210\reDebTbAct , 1, "f" )+",'AjoutVal Ă "+$TimeString+"'");
TagResultCode =SQLExecute( ConnID#PMDMotLog , "BindListTableTest1", 0 );
SQLFirst( ConnID#PMDMotLog ) ;
The bind list BindListTableTest1 contains the connection :
Tag1 <--> "ValeurProcess"
When executing, the IT Logger gives the following error :
-1011: No Rows were selected
Furthermore, the stored procedure gives back the good result when it is called localy in the SQL request analyser.
*******
So, is it possible to get the result from a stored procedure in InTouch ??
Or what do I wrong ??
Thanks,
Pascal