Solved

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

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month7 days, left to enroll

623 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