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
Solved

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

Posted on 2003-12-04
6
485 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
delphi prevent click fast 2 238
CheckListBox usage 3 71
Tidtcpserver listening on multiports? 1 35
How to Get Images From Server to Client using App Tethering 1 25
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

808 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