Re: Does a method exist to Embed a long string into VB6 as a constant?




"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 a
request.
I currently read the template from a file.
I want to embed the template into the compliled code. The request is just
a
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


.



Relevant Pages

  • Re: Controlling Javascript from server side
    ... but five different language implementations here. ... 'true' means that the request must be handled asynchronously. ... There is exactly *no* reason for such a thing here. ... | percent-endoded string). ...
    (comp.lang.javascript)
  • User Defined Types
    ... I have a global template in the startup directory. ... the information is combined into one string using the ... I would like to use the Sdr type with the SaveUserInfo code. ...
    (microsoft.public.word.vba.general)
  • Re: powerpoint automation via vb.net
    ... Dim template As String ... generate Powerpoint presentation?", "Generate Powerpoint", ... render all the ppt as it will be 60 slides. ...
    (microsoft.public.office.developer.automation)
  • Re: Template Issues from Staging Server to Production Server
    ... template to the Site Template Gallery, ... Callstack:    at ... strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, ... Boolean bCreateUniqueSubweb, Boolean bConvertIfThere, Guid webId, Guid ...
    (microsoft.public.sharepoint.portalserver)
  • Re: Is it ok to change $ENV{QUERY_STRING} before "use CGI;" is called..?
    ... the big advantage of wiki, ... It does url-encode if its option is set to use UTF-8 request, ... string for GET requests. ... because "query string" in URL is anyway just a string ...
    (comp.lang.perl.misc)

Quantcast