|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
Refreshing a datasource in ColdFusion
Is there a programmatic way to somehow "refresh" a datasource in CF?Deanna Schneider 05/05/06 11:21 A Deanna,Mark A Kruger 05/05/06 11:43 A Well, thanks for the attempt at help, but as I mentioned, this isn'tDeanna Schneider 05/05/06 12:17 P 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. 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. 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 -----
|
May 24, 2012
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||