Length for the char data type
I'm calling a store procedure from my ColdFusion 8 and passing xml document as a long string using toString() to a store procedure in Sybase
I'm not sure when setting the parameter in the store procedure what length should I use since the xml string passed to this store procedure will be different every time. Some may be very very long but sometimes it may be quite short.
Here is my codes:
<cfxml
variable="MyXML"> ........xml document structure here ......... </cfxml>
<!--- then call str. proc. passing the xml doc as string to Sybase --->
<cfstoredproc procedure="sp_XML_To_SQL" datasource="ADV">
<cfprocparam type="In" cfsqltype="CF_SQL_CHAR" dbvarname="@myxmlstring" value="#toString(MyXML)#">
</cfstoredproc>
<!--- Below is the str. Proc. I have in Sybase --->
Create Procedure dbo.sp_XML_To_SQL
@myxmlstring char (8000) ????? <------------------------ This may be the maximum length for char datatype. Can this number be flexible?
AS
BEGIN
INSERT NewTable values (@xmlstring)
END
