Re: Does a method exist to Embed a long string into VB6 as a constant?
- From: "Ralph" <nt_consulting64@xxxxxxxxx>
- Date: Mon, 20 Aug 2007 09:37:46 -0500
"APSFlorida" <APSFlorida@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:61734784-A45E-4219-9B79-AA81945615EC@xxxxxxxxxxxxxxxx
I have an XML template that I run a substitution process on when froming aa
request.
I currently read the template from a file.
I want to embed the template into the compliled code. The request is just
few KB's long, but I don't want to code a line by line concatenation.Does
some facility exist to embed larger text?
Regards,
Aaron
If you are using VB6 you can do either of the following or a combination...
(If using dotNet the same applies except the limitations are different.
There is also another option, but for that you should post in a dotNet
newsgroup.)
Yes you can define a Const.
A Const can be built using the concatenation operator. There is a limit on
the number of lines that can be concatinated (somewhere around 22 I think).
Not sure about how long any one line can be. Been awhile since I tested it.
But you'll soon find out. <g>
You can create a routine to build the string.
The string can be built from simple assignments and from constants. In any
XML there are a ton of repeating elements.
The difference between the two is the handling of white space (spaces and
carriage returns) Anyway just start pasting and see what works for you.
-ralph
.
- Prev by Date: Re: Windowsmediaplayer control
- Next by Date: Change "Error Trapping" setting at debug time
- Previous by thread: FYI: Sicherheitsupdate "OLEAUT32.DLL" für Visual Basic 6
- Next by thread: Re: Does a method exist to Embed a long string into VB6 as a constant?
- Index(es):
Relevant Pages
|