Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Suzan #1
ASP to Coldfusion Conversion
Hi All,
I have thousands lines of code written in VB and ASP. Does any one know a conversion module from ASP(VB) to Coldfusion
for example convert the IF to CFIF the FOR to CFLOOP
Thanks
Suzan Guest
-
FLV Conversion
When I started using Flash Communication Server in late 2003, I understood that recording streams to flv and then converting to other formats would... -
Running ColdFusion 5.0 and ColdFusion 6.1 concurrently
Hi, this is my first post on this forum, I have tried looking but could not find a post that discussed my problem. I am wondering if it is possible... -
How to call a coldfusion function defined in other coldfusion file??
inside a.cfm, it has code fragment: <cfloop> <cfinclude template="b.cfm"> </cfloop> inside b.cfm, it has code fragment: ... -
[PHP] Mp3 Conversion, using PHP
I'm wondering if there's any crazy dude out there that would like to join me in making a class for PHP to convert Mp3's to Mp3Pro. Have you... -
Mp3 Conversion, using PHP
I'm wondering if there's any crazy dude out there that would like to join me in making a class for PHP to convert Mp3's to Mp3Pro. Even better... -
externalError #2
Re: ASP to Coldfusion Conversion
Originally posted by: Suzan
Hi All,
I have thousands lines of code written in VB and ASP. Does any one know a
conversion module from ASP(VB) to Coldfusion
for example convert the IF to CFIF the FOR to CFLOOP
Thanks
I don't think this is possible.
externalError Guest
-
Suzan #3
Re: ASP to Coldfusion Conversion
Yah i think so, But i do not want 100% converter, since there is some block of code that can not be converted....
Thanks
Suzan Guest
-
externalError #4
Re: ASP to Coldfusion Conversion
Originally posted by: Suzan
Yah i think so, But i do not want 100% converter, since there is some block
of code that can not be converted....
Thanks
ok, you can use CF itself to make a simple application that:
1) reads your *.asp files (using CFFile tag)
2) saves each file's content in a variable
3) does the necessary replacements (if to cfif, else to cfelse, etc...)
4) and saves the result again in the file
you will need to take a look at macromedia coldfusion documentation if you are
new to cfml.
good luck
externalError Guest
-
Suzan #5
Re: ASP to Coldfusion Conversion
It's not simple replacement
such as the attached code . you need to extract the sql statment then insert
it into cfquery
I am Certified Advanced ColdFusion MX Developer ;)
strSQLStatement = "SELECT
CLIENT_NUMBER,GROUP_NUMBER,CLIENT_LEVEL,SERVICE_CO NTRACT_ID,PARENT_CLIENT_NUMBER
,EFFECTIVE_DATE FROM CIS_CLIENT_LINKS cllinks WHERE " &_
"CLIENT_NUMBER = '" & strClientNumber & "' AND " &_
"SERVICE_CONTRACT_ID = '" &
DBGetValue(hdlClientAccount,"SERVICE_CONTRACT_ID") & "' AND " &_
"INSTITUTION_NUMBER = '" & strInstitution & "' AND " &_
"EFFECTIVE_DATE = (SELECT MAX(EFFECTIVE_DATE) FROM CIS_CLIENT_LINKS
WHERE " &_
"CLIENT_NUMBER = cllinks.CLIENT_NUMBER AND " &_
"INSTITUTION_NUMBER = cllinks.INSTITUTION_NUMBER AND " &_
"GROUP_NUMBER = cllinks.GROUP_NUMBER AND " &_
"SERVICE_CONTRACT_ID = cllinks.SERVICE_CONTRACT_ID AND " &_
"CLIENT_LEVEL = cllinks.CLIENT_LEVEL)" &_
"ORDER BY CLIENT_LEVEL DESC"
'
hdlClientLinks = DBOpen(strSQLStatement,True)
Suzan Guest
-
externalError #6
Re: ASP to Coldfusion Conversion
Suzan, I'm certified as well, but I can not write a full cf application for
free to show that I'm certified and capable of writing advanced applications :)
true? anyway, in case you are newbie this is a simple code that will guide you
to your full application:
<cfparam name="rootDir" default="c:\inetpub\wwwroot\asptest\application1\" >
<cfparam name="replaceFrom" default="if">
<cfparam name="replaceTo" default="<cfif>">
<cfdirectory action="list" directory="#rootDir#" name="filesList" sort="type"
filter="*.asp">
<cfoutput query="filesList">
<cfif compareNoCase(type,"dir") and right(name,3) is "asp">
<cffile action="read" file="#rootDir##name#" variable="filecontent">
<cfset newfilecontent=replace(filecontent,replaceFrom,rep laceTo,"all")>
<cffile action="write" file="#rootDir#new_#name#" output="#newfilecontent#"
nameconflict="overwrite">
</cfif>
</cfoutput>
chaw
externalError Guest



Reply With Quote

