Home All Groups Group Topic Archive Search About

ADO.Net with LongVarChar

Author
29 Jun 2006 10:05 PM
BrianB
I am using Visual Studio 2005 and am trying to store the text XML
response from a socket communication with a vendor into a LongVarChar
field in a table.  The data always seems truncated to 2KB.  I have
been using the Pervasive SQL .Net provider, and programs I've worked
with under Visual Studio 2003 haven't had this problem -- I have been
saving 5KB into a field without a problem.  I also tried using
OLEDB.Net with a MS Access database and the data is being truncated at
the same point, so it doesn't seem to be specific to the Pervasive SQL
provider.

Below is a code sample setting the parameter for a OleDBCommand:

Dim pp9 = pcmd1.Parameters.Add("XML_RESPONSE", OleDbType.LongVarChar,
Len(sXML_Response))

pp9.value = sXML_Response

Console.WriteLine("length sxml_response: " & Len(sXML_Response))

Console.WriteLine("length pp9.value: " & Len(pp9.value))


The length of the sXML_Response variable and the pp9.value both show
to be just over 3500 bytes, but not all the data saves.  Any ideas
would be greatly appreciated.  Thanks!


Brian Borders
Bri***@TheDartBoard.net

AddThis Social Bookmark Button