Mzman писал(а):Гениальный ответ
Может быть. Но, увы, неполный.
InTouch - Help - Указатель - SQLSelect
Из описания видно что Select возвращает строку БД, а не таблицу. И хранимую процедуру из InTouch, увы, не вызвать.
----------------------
Ошибся
SQL Statement to pass parameters to a stored procedure (Return parameters passed through a bind list)
Note: @xxxx are input parameters in the stored procedure
Statement="exec sp_ValidateLot @NoDeLot = '"+ InSelectLot + "'" + ", @NoDeCuve = '"+ InSelectCuve +"'" + ", @ActualDateTime = '"+ InActualDateTime +"'";
ResultCode_Runtime1=SQLSetStatement(ConnectionId_Runtime, Statement);
ResultCode_Runtime2=SQLExecute(ConnectionId_Runtime,"ValidateLotBindList",0);
ResultCode_Runtime3=SQLFirst(ConnectionId_Runtime);
How do I run a Stored Procedure without a bind list? I don't need to return any data from my Stored Procedure. How do I run the SQLExecute() properly?
Resolution Description: Use SQLExecute(ConID, "", SqlHandle); Note: You still need at least one Bindlist in your application; It can be a dummy Bindlist. Creating the bindlist creates the SQL.def file needed for SQLAccess Manager.
How To: Insert a record into a database using a stored procedure
ResultCode1 = SQLSetStatement(ConnectionId,"EXEC sp_UpdateBatchMasterBaseMixTankIng ' "; + Tag.Value + "; ' "); ResultCode2 = SQLPrepareStatement(ConnectionId,SQLHandle1); ResultCode3 = SQLExecute(ConnectionId,"Dummy",SQLHandle1);
Can SQL Access accept a return value from a stored procedure?
Yes, the value must be stored in a Table in the Database and a Bind List must be created to access the value.
Also see the SQLAccess User's guide (и здесь тот же гениальный ответ!!!)
No records returned from MSSQL after SQL insert, select via stored procedure.
The problem is specific to the SQL code used, and Microsoft SQL Server.
Modify the stored procedure by setting NOCOUNT on until after the SQL insert.
Resolved by turning NOCOUNT on before the insert, and turning NOCOUNT off after the insert/before the select. Refer to the SQL Server Books Online for more information
Вот теперь ответ более-менее полный.
Vita est dolor.