Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Migrating from CF 6 to MX7

New Here ,
Mar 07, 2008 Mar 07, 2008
Hi all,
first let me say that I am no CF developer, so some concepts might escape me.

I've got a pretty old ColdFusion 6 application on my hands that I need to migrate to MX 7 version. The application is dual-language web store that uses mySQL on the backend.

As far as I understand the connection to the DB is made via ODBC.
Being not quite familiar with CF I am confused between several ways the application is talking to DB. So far I see:


What's the difference? What is the correct way?
TOPICS
Getting started
367
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 07, 2008 Mar 07, 2008
Zealus.com wrote:
> Hi all,
> first let me say that I am no CF developer, so some concepts might escape me.
>
> I've got a pretty old ColdFusion 6 application on my hands that I need to
> migrate to MX 7 version. The application is dual-language web store that uses
> mySQL on the backend.
>
> As far as I understand the connection to the DB is made via ODBC.
> Being not quite familiar with CF I am confused between several ways the
> application is talking to DB. So far I see:
>
>
> What's the difference? What is the correct way?
>
> <cfquery datasource="data_source" dbtype="ODBC">
> INSERT INTO Users (CFID, Date) VALUES ('#client.cftoken#',
> '#DateFormat(Now(),"YYYY-MM-DD")#')
> </cfquery>
>
> <cfquery datasource = "data_source" name = "getToken">
> SELECT CFID, Language FROM Users WHERE UserID = #getUser.LastUser#
> </cfquery>
>
> <cfquery name="rsCategory" datasource="data_source">
> SELECT CategoryID, Category, Category_Rus FROM Categories ORDER BY
> CategoryID ASC
> </cfquery>
>


They are all correct accept the dbtype="ODBC". That parameter was
deprecated in version CFMX (version 6) accept for a value of 'query'
which is used to use <cfquery...> tags and SQL code to combine two
record sets that are already in memory. As of this time, the value of
'ODBC' is probably just ignored, but the documentation does warn that
using values other then 'query' may cause errors in the future.

Previous to CFMX (version 6) one could provide the complete database
connection detsails (dbName, dbServer, provider, providerDSN, dbType) in
the <cfquery...> tag. Thus not requiring DSN configuration details set
in the ColdFusion administrator. This is no longer true.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 08, 2008 Mar 08, 2008
Thank you for concise answer.

Could that dbtype="ODBC" be a reason for extreme slowness of the page where this call is made? It's only one page (index.cfm), so whenever visitor opens it up there is a huge delay (over a minute, actually). However, if you try to access any other page everything opens smoothly and much faster.

Also,
if I understand you correctly the syntax for DB calls remains the same from version CF 6 to CF MX7. So aside from the line in question there are no other changes in DB calls that need to be made for transition from CF 6 to CF MX7?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 08, 2008 Mar 08, 2008
Quick update: I have tried to remove dbtype="ODBC" and the web site crashed with error: "Unable to connect to JRun server".

Any ideas?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 09, 2008 Mar 09, 2008
The answer probably lies in the datasource connection on your admin page, not with your cfquery code.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 10, 2008 Mar 10, 2008
LATEST
Dan,
that's what I suspected as well. After much talking to the hosting guys (I don't have access to any configuration tools whatsoever) the connection has been fixed and the only problem left is broken Unicode transition. See my another topic for it.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources