The dsn tag defines the ColdFusion datasource that Reactor will use to connect to your database. The ColdFusion datasource must already be configured and working. This value is automatically provided to all Reactor generated queries. You can access this value from inside any reactor generated object (that extends reactor.base.abstractObject). The following example shows this (and assumes that the cfquery tag is inside a reactor generated cfc):
<cfquery name="users" datasource="#_getConfig().getDsn()#">
SELECT
*
FROM Users
</cfquery>
|
Attribute |
Required |
Description |
|---|---|---|
|
value |
Yes |
Defines the datasource that Reactor will use |
None
<reactor>
<config>
<project
value="Scratch" />
<dsn
value="scratch" />
<type
value="mssql" />
<mapping
value="/reactorData" />
<mode
value="always" />
</config>
</reactor>