Solved

What kind of output does TXMLDocument.XML.Text deliver? Mismatch problem with parameter.value ... :(

Posted on 2003-12-04
6
484 Views
Last Modified: 2010-04-05
Hi!

I'm using:
 paramADOXML     : Parameter;
 paramXMLString  : WideString;

The following two lines of code generates the error "The application uses a value of the wrong type"
   paramXMLString :=   myXML.XML.Text;
   paramADOXML.Value := paramXMLString;

but if I exchange it for the following, it works perfectly!!!
   paramADOXML.Value := '<DAL typ="logMessage"><Message Sender="Henrik" Receiver="Collins" CorrelationID="0" TransactionID="0" Message="hello world"/></DAL>';

How come? Why doesn't he accept the paramters in the first place?

The parameter is supposed to be of the text type, I'm using a SQL Server Database.

cheers,

henrik


0
Comment
Question by:henrikatwork
  • 2
6 Comments
 
LVL 2

Expert Comment

by:classmate
ID: 9876420
Just a guess: Use String instead of WideString ???

regards
classmate
0
 
LVL 1

Author Comment

by:henrikatwork
ID: 9880503
No, that doesn't work...
0
 
LVL 2

Expert Comment

by:zzzxtreme
ID: 9880722
paramXMLString prints out correctly as you would expect?
0
 
LVL 1

Accepted Solution

by:
henrikatwork earned 0 total points
ID: 9880760
I don't know how come this can be, but by changing the size from 255 to 4000 it works... It seems to me, as if the XML header (<!--utf-8 etc... >) contained those extra characters that wouldn't fit into the param of the size 255!

Thanks for trying, problem solved.

cheers,

henrik
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now