Re: Weird ADO error, any ideas?



That error revolves around XML.  If you have an XML feed, how often do
you get the feed and where is it from?  If the field causing the
trouble is varchar, it doesn't seem someone would store extended ascii
characters there, and it may be that what got into that field are
remains of the connector and processor errors of the XML feed.  Check
logs (if any) for the process that accepts the XML.  As ADO attempts
to find the next record (or break down fields) through internally
parsing bytes, it's probably choking because it's finding some sort of
extended ascii that is like a bad delimiter.  It's probaby a change in
the XML feed, someone has left off a quote, or something like that, in
an element.

You're basically correct, except that the "someone" is me!! I wrote (yes, a long time ago) the coding that produces the data that gets sent. I guess I must have been lucky all this time that the binary data didn't cause any problems in the XML.


For reasons lost in the midst of time (probably a mixture of inexperience and poor coding practice if I'm honest), I stored the data in a varchar field. I was pulling it out of the database and into a VB string variable, and then manipulating it there. I guess I got complacent as VB allows you to put pretty much any characters in a string. It seems that after all these years, I got caught out.

Any ideas how I would pull out the data from the database without it causing a problem? I tried casting the varchar field as a varbinary, but the data that came back didn't look anything like what was stored in the database. Surely there must be some approved way of getting binary data through XML.

Thanks for the reply.

Hello,

I have an application that has been running fine for ages, but has
suddenly started generating a weird error. I grab hold of an ADO
recordset, and loop through it. For some reason, the MoveNext method of
the recordset fails on some records, giving the error -2147467259 "A
string literal was not closed."

When this happens, the program is stuck as it cannot move to the next
record, thus making any subsequent data impossible to access.

Now I am completely at a loss as to what this means. How can ...

rs.MoveNext

generate such an error. I couldn't find anything remotely useful on
MSDN, nor elsewhere.

Anyone any ideas? TIA


-- Alan Silver (anything added below this line is nothing to do with me) .



Relevant Pages

  • Re: how to insert xml into sql 2005
    ... For right now I just know I have to get this into the sql database. ... to the contents of a SQL Server database. ... to XML processing no matter how big the XML document is. ... ,captionnohtml varchar 'CaptionNoHTML' ...
    (microsoft.public.sqlserver.xml)
  • Re: how to insert xml into sql 2005
    ... For right now I just know I have to get this into the sql database. ... to XML processing no matter how big the XML document is. ... ,captionnohtml varchar 'CaptionNoHTML' ...
    (microsoft.public.sqlserver.xml)
  • Re: nvarchar max
    ... Yes, SQL FTS supports char, nchar, varchar, nvarchar, varchar, ... nvarchar, image, varbinary and xml. ...
    (microsoft.public.sqlserver.fulltext)
  • Re: how to insert xml into sql 2005
    ... For right now I just know I have to get this into the sql database. ... The second one is how can I automation the xml import ever evening. ... ,captionnohtml varchar 'CaptionNoHTML' ... ,options varchar 'Options' ...
    (microsoft.public.sqlserver.xml)
  • Re: Clean out accents in French names
    ... > application that reads the XML is fussy about characters. ... did you set the encoding attribute in the XML file explicitely to ... If not then the file would contain "extended ASCII" but the other ...
    (comp.lang.perl.misc)

Loading