DataMgr 2.5 Documentation: Getting Started

Getting Started

To use DataMgr, follow these steps:

  1. Download DataMgr
  2. Place it where you want to store it (code example assumes root of site or CustomTags directory).
  3. Initialize DataMgr
Application.DataMgr = CreateObject("component","DataMgr").init("mydsn")

Note that "mydsn" in this example is the datasource. That could also be a variable that holds the value of your datasource.

If you don't have Java access enabled, you will have to specify the database as well:

Application.DataMgr = CreateObject("component","DataMgr").init("mydsn","MSSQL")

DataMgr can also be instantiated with no datasource argument at all. If Application.datasource exists, it will use that as a default. Otherwise, it will use the simulated database.

Application.DataMgr = CreateObject("component","DataMgr").init()

The "init" method has the following arguments.

CFC Docs