Solved

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

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 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

11 Experts available now in Live!

Get 1:1 Help Now