Connecting to Microsoft SQL Server Databases

ColdFusion lets you access SQL Server databases from Windows NT and UNIX, using ODBC and OLE DB drivers.

Configuring Microsoft SQL Server Options (Windows)

If you install the ColdFusion Server on a Windows NT server, you can configure Microsoft SQL Server as a ColdFusion data source using an ODBC or an OLE DB driver. For information about using OLE DB drivers with ColdFusion data sources, see Advanced ColdFusion Server Administration.

The following table describes ColdFusion ODBC options for Microsoft SQL Server data sources. You set these options when you configure a ColdFusion data source.
Option
Description
Data Source Name
A name for your ODBC data source.
Description
A short description of the data source.
Server
The name of the server hosting the database that you want to use. If the SQL Server database is local and you are using the Microsoft SQL Server driver, enclose the word local in parentheses: (local).
  • Use Trusted Connection Allows SQL Server to authenticate users based on their Windows NT logins. You can use this option if the SQL Server database uses an Integrated or Mixed security mode.
Login Info
  • Database The name of the SQL Server database.
  • Language The national language used by SQL Server.
  • Generate Stored Procedure for Prepared Statement Stored procedures are created for prepared statements when you select this option. The SQL Server driver prepares a statement by placing it in a procedure and compiling that procedure.
Translation
Convert OEM to ANSI characters Select this option if the SQL Server client computer and SQL Server are using the same non-ANSI character set. For example, if SQL Server uses code page 850 and the client computer uses code page 850 for the OEM code page, selecting this option ensures that extended characters stored in the database convert properly to ANSI for use by Windows-based applications.

Configuring Microsoft SQL Server Options (UNIX)

If you install ColdFusion Server on a UNIX server, you can configure Microsoft SQL Server as a ColdFusion data source using an ODBC driver.

The following table describes ColdFusion options for the MERANT MS SQL Server ODBC driver. You set these options when you configure a ColdFusion data source.
Option
Description
Data Source Name
A name for your ODBC data source.
Description
Descriptive information about the data source.
Database Name
The name of the database to which you want to connect.
Server IP Address
The IP Address of the server that contains the SQL database that you want to access.
Server Port
The number of the TCP/IP port which the server monitors for connections.
Create Stored Procedures
Determines whether stored procedures should be created on every call, only if parameters are specified, or never.



Banner.Novgorod.Ru