DataMgr 2.2 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")

Important:If you have the "init" call in a separate line, you must use the result of the "init" call instead of the result of the CreateObject line.

Alternately, you can call the database adaptor that you want to use directly:

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

CFC Docs