Link to home
Start Free TrialLog in
Avatar of henrikatwork
henrikatworkFlag for Sweden

asked on

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

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


Avatar of classmate
classmate
Flag of Norway image

Just a guess: Use String instead of WideString ???

regards
classmate
Avatar of henrikatwork

ASKER

No, that doesn't work...
Avatar of zzzxtreme
zzzxtreme

paramXMLString prints out correctly as you would expect?
ASKER CERTIFIED SOLUTION
Avatar of henrikatwork
henrikatwork
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial