DATABASE: Difference between revisions

From BR Wiki
Jump to navigation Jump to search
Line 6: Line 6:
===DSN===
===DSN===
Syntax:
Syntax:
  CONFIG DATABASE <db-ref>  DSN=<dsn-ref>  [, USER= <department> | LOGIN_NAME | ? ] [, {PASSWORD= <dept-password> | BR_PASSWORD | ?} | PASSWORD=<encrypted-password> ]
  CONFIG DATABASE <db-ref>  DSN=<dsn-ref>  [, USER= <department> | LOGIN_NAME | ? ] [, {PASSWORD= <dept-password> | BR_PASSWORD | ? } | PASSWORD=<encrypted-password> ]
The ? indicates prompt
The ? indicates prompt



Revision as of 20:40, 5 October 2015

In version 4.3 and higher CONFIG DATABASE may use one of 3 methods for connecting to SQL Sources:

  • DSN
  • CONNECTSTRING
  • ODBC-MANAGER

DSN

Syntax:

CONFIG DATABASE <db-ref>  DSN=<dsn-ref>  [, USER= <department> | LOGIN_NAME | ? ] [, {PASSWORD= <dept-password> | BR_PASSWORD | ? } | PASSWORD=<encrypted-password> ]

The ? indicates prompt

Example:

EXECUTE 'CONFIG DATABASE CLS_Data DSN="MyData"'

CONNECTSTRING (DSN Less)

Syntax:

CONFIG DATABASE <db-ref>  CONNECTSTRING="<Driver>={Microsoft Access Driver (*.mdb)} DBQ=C:\inetpub\wwwroot\BegASP\Chapter.14\Contact.mdb"

Sample Connection Strings:

Using a SQL Server /w SQL Login:

CONFIG database db-ref connectstring="DRIVER=SQL Server;SERVER=server;Initial Catalog=database;UID=username;PWD=password"

"db-ref" is the database reference. "server" is the SQL Server [FQDN] or IP Address "database" is the [SQL Server Database] "username" is the [SQL Server User Name] "password" is the [SQL Server Password]

Using a SQL Server /w Windows Authentication:

CONFIG database db-ref connectstring="DRIVER=SQL Server;Initial Catalog=database;Persist Security Info=True;MultipleBC_TableResultSets=True; Database=database;SERVER=server;Login Name=username;Password=BR_PASSWORD"

"db-ref" is the database reference.

"server" is the SQL Server [FQDN] or IP Address

"database" is the [SQL Server Database]

"username" is the [SQL Server User Name]

BR_PASSWORD will use the users Active Directory password to connect to the SQL Server.

"SQL Server" is one of several choices for SQL Server, another choice would be SQL Server Native Client 11.0

ODBC-MANAGER

Syntax:

CONFIG DATABASE <db-ref> ODBC-MANAGER

Using ODBC Manager as the parameter will allow the end user to select the desired data source.