Guest_imported
New member
- Jan 1, 1970
- 0
Here is my error copied out of the Event Viewer.
ErrDescription : [Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting
the varchar value '<FACIL_PMT_TYPES><PMT_TYP_CD>' to a column of data type smallint. :
And my SP:
CREATE PROCEDURE sp_GetAvailablePaymentTypeInfoAsXML
@Payment_Types_XML varchar(1000) OUTPUT
AS
Declare @PaymentTypeCode smallint
Declare @PaymentTypeDescription varchar(50)
Declare PaymentTypes_Cursor CURSOR For
select PMT_TYP_CD, PMT_TYP_DESC from REPR_FACIL_PMT_TYP
Open PaymentTypes_Cursor
FETCH NEXT FROM PaymentTypes_Cursor Into @PaymentTypeCode, @PaymentTypeDescription
SET @Payment_Types_XML = "<FACIL_PMT_TYPES>"
WHILE @@FETCH_STATUS = 0
BEGIN
SET @Payment_Types_XML = @Payment_Types_XML + "<PMT_TYP_CD>" + @PaymentTypeCode + "</PMT_TYP_CD>" + "<PMT_TYP_DESC>" + @PaymentTypeDescription + "</PMT_TYP_DESC>"
FETCH NEXT FROM PaymentTypes_Cursor Into @PaymentTypeCode, @PaymentTypeDescription
END
SET @Payment_Types_XML = @Payment_Types_XML + "</FACIL_PMT_TYPES>"
Close PaymentTypes_Cursor
Deallocate PaymentTypes_Cursor
ErrDescription : [Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting
the varchar value '<FACIL_PMT_TYPES><PMT_TYP_CD>' to a column of data type smallint. :
And my SP:
CREATE PROCEDURE sp_GetAvailablePaymentTypeInfoAsXML
@Payment_Types_XML varchar(1000) OUTPUT
AS
Declare @PaymentTypeCode smallint
Declare @PaymentTypeDescription varchar(50)
Declare PaymentTypes_Cursor CURSOR For
select PMT_TYP_CD, PMT_TYP_DESC from REPR_FACIL_PMT_TYP
Open PaymentTypes_Cursor
FETCH NEXT FROM PaymentTypes_Cursor Into @PaymentTypeCode, @PaymentTypeDescription
SET @Payment_Types_XML = "<FACIL_PMT_TYPES>"
WHILE @@FETCH_STATUS = 0
BEGIN
SET @Payment_Types_XML = @Payment_Types_XML + "<PMT_TYP_CD>" + @PaymentTypeCode + "</PMT_TYP_CD>" + "<PMT_TYP_DESC>" + @PaymentTypeDescription + "</PMT_TYP_DESC>"
FETCH NEXT FROM PaymentTypes_Cursor Into @PaymentTypeCode, @PaymentTypeDescription
END
SET @Payment_Types_XML = @Payment_Types_XML + "</FACIL_PMT_TYPES>"
Close PaymentTypes_Cursor
Deallocate PaymentTypes_Cursor