Multiple Datasources

30 views
Skip to first unread message

steelers4582

unread,
Apr 16, 2012, 12:49:00 PM4/16/12
to framework-one
I was wondering how I can use different datasources on the same code
with FW/1. We are building an app which can be used by multiple
projects but each will have it's own datasource, but use the same
code. Thanks

Will Coleda

unread,
Apr 16, 2012, 3:13:31 PM4/16/12
to framew...@googlegroups.com
This sounds like more of a CF question than a FW/1 question -

If you set "this.datasource" in your Application.cfc, then any call to
cfquery/storedproc in the app will use that named datasource (unless
you override it when invoking the query/proc).

You could take this one step further and pull in the name of the
datasource from a .xml file (e.g.) that you read in at application
start time, allowing the code to be the same, and then changing only
the config file.

Does this help?

> --
> FW/1 on RIAForge: http://fw1.riaforge.org/
>
> FW/1 on github: http://github.com/seancorfield/fw1
>
> FW/1 on Google Groups: http://groups.google.com/group/framework-one

--
Will "Coke" Coleda

Reply all
Reply to author
Forward
0 new messages