We have just started using a SQL Server 2005 database with our CF MX 7
server. I have been instructed to set up an application that uses the
native XML datatype in SQL Server so that we will be able to port
information when needed to other platforms.
I'm probably not the only one wondering why you aren't doing it /when
needed/. I would think you would store the data in the fastest
accessible format and then output it to XML if/when you decided to
change platforms. Is this a feature in your application? Well, I'm not
sure even that makes a difference. Even then I would think you'd store
it in the native format and then if someone clicked the "export" button
you'd convert it then and there.
If I have sql return the tag to be put into the html
ie(<cf_getReference id="1"
type="activity">), the coldfusion server will not process the tag since
it is contained in the query return.
As has already been suggested, writing to a temp file (or keeping just a
reference to the file in the DB and writing that file upon changes to
it) is the normal way I've seen this handled. However, if you have
just a set of tags like the one you mentioned, you might also consider
doing something like this:
1) regular expression search for <cf_ ... >,
2) loop through the search results
3) find text between "<cf_" and ">"
4) <cfsavecontent variable="theTag"><cfinclude template="text found in
3"></cfsavecontent>
5) output using #theTag#
I would also think this is preferable to doing a ton of cffile
operations (the hard drive being so slow and all).
Short of changing the approach or writing a cold fusion interpreter in
cold fusion (as I recall, we started a simple one on experts exchange
some time in 2003, but I can't seem to find it now), I don't know what
else you could do.
If I have coldfusion do the
transformation, I have a feeling that the coldfusion server will produce
a longer load time and would then be needed in all platforms to do the
transformation. Any suggestions?
If you have coldfusion do the transformation...? Are there other
options? (Did I misunderstand the question?)
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).
An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]