House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

Refreshing a datasource in ColdFusion

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Deanna,
Mark A Kruger
05/05/06 11:43 A
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Deanna Schneider
05/05/2006 11:21 AM

Is there a programmatic way to somehow "refresh" a datasource in CF? I've noticed that, periodically, I'll have a datasource that won't recognize new objects for some period of time. I think it's a caching issue. (These are oracle datasources with CF 6.1 Enterprise, though I'm not positive which driver is being used.) We happen to have 2 datasources that point to the same Oracle box: one a generic name that works on dev-test-prod and points to the appropriate instance of Oracle based on which instance of CF we're on; and one that explicitly points to the dev-test-production instance. I typically use the generic one, so that no code needs to change between dev-test-prod. But, sometimes, when I upload a new app to production, CF insists the underlying Oracle objects don't exist. If I switch the code to use the explicit dsn, voila, all works. The next day I can usually come back and switch it back and it works with the generic one, which is what makes me think it's a caching issue of some sort. This is not the same thing as the select * issue with not recognizing new columns added, as in my case, it doesn't even recognize that the tables exist. Thanks for any insight.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Mark A Kruger
05/05/2006 11:43 AM

Deanna, Not sure of a programatic way - but you can add spaces to the queries in question (alter the query) to get the new schema.  See this blog entry and the comments below. http://mkruger.cfwebtools.com/index.cfm?mode=alias&alias=dbschemaChange Is there a programmatic way to somehow "refresh" a datasource in CF? I've noticed that, periodically, I'll have a datasource that won't recognize new objects for some period of time. I think it's a caching issue. (These are oracle datasources with CF 6.1 Enterprise, though I'm not positive which driver is being used.) We happen to have 2 datasources that point to the same Oracle box: one a generic name that works on dev-test-prod and points to the appropriate instance of Oracle based on which instance of CF we're on; and one that explicitly points to the dev-test-production instance. I typically use the generic one, so that no code needs to change between dev-test-prod. But, sometimes, when I upload a new app to production, CF insists the underlying Oracle objects don't exist. If I switch the code to use the explicit dsn, voila, all works. The next day I can usually come back and switch it back and it works with the generic one, which is what makes me think it's a caching issue of some sort. This is not the same thing as the select * issue with not recognizing new columns added, as in my case, it doesn't even recognize that the tables exist. Thanks for any insight.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Deanna Schneider
05/05/2006 12:17 PM

Well, thanks for the attempt at help, but as I mentioned, this isn't the same issue. It would suck almost more if it were, as it would mean that I'd have to add a space to every query in the application. (It's not throwing an error on a single select * type query - it's not recognizing any new objects for the datasource.) ----- Excess quoted text cut - see Original Post for more -----


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     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     

Designer, Developer and mobile workflow conference