Solved

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

Posted on 2003-12-04
6
487 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

752 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