I'm getting the following error when trying to run a store procedure in MSSQL:
"Internal Error - Data Truncated - The buffer for receiving data is too short"
I think it has something to do with Alpha, because I can run it directly in SSMS and it works fine.
Here is the stored procedure:
Following is my interactive window code, and the results I'm getting:
Any input would be appreciated!
Thanks, Dan
"Internal Error - Data Truncated - The buffer for receiving data is too short"
I think it has something to do with Alpha, because I can run it directly in SSMS and it works fine.
Here is the stored procedure:
Code:
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: <Author,,Name> -- Create date: <Create Date,,> -- Description: <Description,,> -- ============================================= CREATE PROCEDURE [dbo].[sp_test] -- Add the parameters for the stored procedure here @whatCompany char(32), @whatUser varchar(32), @whatData CHAR(150) OUTPUT AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; DECLARE @whatSORefNum VARCHAR(25); DECLARE @whatWORefNum VARCHAR(25); DECLARE @whatTaskCnt INT; DECLARE @whatResult VARCHAR(25); -- Insert statements for procedure here SET @whatResult = 'success'; SET @whatData = CONCAT('{"result":"',isnull(@whatResult,'null'),'","WORefNum":"',isnull(@whatWORefNum,'null'),'","SORefNum":"',isnull(@whatSORefNum,'null'),'","TaskCnt":',isnull(@whatTaskCnt,0),'}'); END GO
Code:
dim cn as SQL::Connection ?cn.open("::Name::conn") = .T. dim sqlStmt as c = "{CALL sp_test(:whatCompany, :whatUser, :whatData)}" dim args as SQL::Arguments args.Set("whatCompany","Test Company") args.Set("whatUser","Test User") args.SetNull("whatData","C",SQL::ArgumentUsage::InputOutputArgument) ?cn.Execute(sqlStmt,args) = .F. ?cn.CallResult.Text = "Internal Error - Data Truncated - The buffer for receiving data is too short"
Thanks, Dan
Comment