macromedia.coldfusion.database_access
[Top] [All Lists]

Re: Connecting to the Datasource in ColdFusion 8 vs CF 6

Subject: Re: Connecting to the Datasource in ColdFusion 8 vs CF 6
From: "Ken Ford" <newsgroups2@xxxxxxxxxxxx>
Date: Sun, 27 Jul 2008 10:37:33 -0500
Newsgroups: macromedia.coldfusion.database_access


not sure if these help:

http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=basiconfig_37.html

http://localhost/CFIDE/adminapi/datasource.cfc

--
Ken Ford
Adobe Community Expert - Dreamweaver/ColdFusion
Fordwebs, LLC
http://www.fordwebs.com


"MKK2" <webforumsuser@xxxxxxxxxxxxxx> wrote in message 
news:g6d5sa$s0q$1@xxxxxxxxxxxxxxxxxxxxxxxx
Hi all,

I have a CF6 application that is running well. However, I'm in the process of upgrading to CF8, and some of the code no longer works. I've scoured the documentation and haven't found information on the replacement code.

My old code gets a datasource, acquires a database connection, uses the connection, and then closes the datasource.


variables.dsService = CreateObject("java", "coldfusion.server.ServiceFactory").DataSourceService;
      variables.dsManager = dsService.getDman();
variables.dataSource = variables.dsManager.getDataSource(<data source name goes here>);
      variables.dbConnection = variables.dataSource.getConnection();
      <code to use the db connection goes here>
      variables.dbConnection.close();

Under CF8, the error message is "The getDman method was not found." So I've been unable to find any code that will let me get access to an object that implements DataSource, so that I can use my connections.

Any advice would be appreciated.

Mike K.


<Prev in Thread] Current Thread [Next in Thread>