> I have written some code which dynamically modifies the
> database directory location for a Microsoft dBase ODBC
> DSN using registry manipulation with CFREGISTRY. My problem
> is that when the directory changes it seems as though
> ColdFusion has cached or is holding on to the original
> connection because as I iterate of multiple file databases
> I keep getting results from the first database directory
> location. If I go to the ColdFusion Admin I can see that
> the directory is changing but I cannot get "fresh" results
> unless I click Update or re-verify my DSN is the administrator.
>
> Is there a way to programmatically refresh my datasource
> connection as I iterate over my different file locations so
> that CF does not hang onto the initial file? I have tried
> unchecking the "maintain database connection" box but that
> does not help. I am using CF 4.01 on NT. If I were using CF
> 4.5 would this be possible?
CF, like other Windows applications and services, reads the registry when it
starts, which is why it doesn't notice your changes to the registry when
it's running. When you change the DSN info in the Administrator, CF reloads
the information in addition to changing the registry. I believe there's an
"undocumented" function, something like CFUSION_DBCONNECTION_RESET, that
will load the changes from the registry.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.