ASP to Coldfusion Conversion

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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...
    2. 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...
    3. 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: ...
    4. [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...
    5. 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...
  3. #2

    Default 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

  4. #3

    Default 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

  5. #4

    Default 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

  6. #5

    Default 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

  7. #6

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139