SQLConfigDataSource

SQLConfigDataSource 

The Microsoft® SQL Server™ ODBC driver supports the following SQL Server-specific keyword/value pairs for data source configuration attribute strings.

KeywordValuesDescription
Address Network address of the SQL Server.
AnsiNPWyesDefault. Specifies that ANSI_NULLS, ANSI_WARNINGS, ANSI_PADDING, and CONCAT_NULL_YIELDS_NULL are set ON for each connection. This allows SQL Server to treat SQL statements as per SQL-92. For more information see Effects of SQL-92 Options.
 noDo not use ANSI-defined behaviors for NULL comparisons, padding, warnings, and NULL concatenation.
AttachDBFileNamefile_pathName of the primary file of an attachable database. Include the full path, and escape any / characters if using a C character string variable:

AttachDBFileName=c://AB//MyDB.mdf

This database is attached and becomes the default database for the connection. To use AttachDBFileName you must also specify the database name in either the SQLDriverConnnect DATABASE parameter or the SQL_COPT_CURRENT_CATALOG connection attribute. If the database was previously attached, SQL Server will not reattach it; it will use the attached database as the default for the connection.

AutoTranslateyesDefault. ANSI character strings sent between the client and server are translated by converting through Unicode to minimize problems in matching extended characters between the code pages on the client and the server:

Client SQL_C_CHAR data sent to a SQL Server char, varchar, or text variable, parameter, or column is converted from character to Unicode using the client ANSI code page (ACP), then converted from Unicode to character using the ACP of the server.

SQL Server char, varchar, or text data sent to a client SQL_C_CHAR variable is converted from character to Unicode using the server ACP, then converted from Unicode to character using the client ACP.

These conversions are performed on the client by the SQL Server ODBC driver. This requires that the same ANSI code page (ACP) used on the server be available on the client.

These settings have no effect on the conversions that occur for these transfers:

Unicode SQL_C_WCHAR client data sent to char, varchar, or text on the server.

char, varchar, or text server data sent to a Unicode SQL_C_WCHAR variable on the client.

ANSI SQL_C_CHAR client data sent to Unicode nchar, nvarchar, or ntext on the server.

Unicode char, varchar, or text server data sent to an ANSI SQL_C_CHAR variable on the client.

 noDo not perform character translation.

The SQL Server ODBC driver does not translate client ANSI character data sent to char, varchar, or text variables, parameters, or columns on the server. No translation is performed on char, varchar, or text data sent from the server to character variables on the client.

If the client and SQL Server installation are using different ACPs, then extended characters can be misinterpreted.

Database Name of the default database for the connection. If Database is not specified, the default database defined for the login is used. The default database from the ODBC data source overrides the default database defined for the login. If AttachDBFileName points to a primary database file, the database is attached and given the name specified in Database.
Description Descriptive text. The description appears with the data source in the ODBC Management utility.
Driver{SQL Server}Driver name. The braces are required when using version 2.65 or earlier of the SQL Server ODBC driver.
Fallback
(SQL Server 6.5 only)
yesFallback connection attempts are made if a connection to the primary server fails. Available only when connecting to an instance of SQL Server 6.5.
 noDefault. Fallback connection attempts are not made.
Language SQL Server language name. SQL Server can store messages for multiple languages in sysmessages. If connecting to a SQL Server with multiple languages, Language specifies which set of messages are used for the connection.
Network Name of a Net-Library dynamic-link library. The name need not include the path and must not include the .dll file name extension, for example, Network=dbnmpntw.
QueryLog_OnyesEnables logging of long-running queries.
 noDefault. Disables logging of long-running queries.
QueryLogFile Full path and name of the file used to log long-running queries.
QueryLogTime Digit character string specifying the threshold (in milliseconds) for logging long-running queries. Any query that does not get a response in the time specified is written to the long-running query log file.
QuotedIdyesDefault. Specifies that QUOTED_IDENTIFIERS is set ON for each connection, SQL Server uses the SQL-92 rules regarding the use of quotation marks in SQL statements. For more information, see Effects of SQL-92 Options.
 noSpecifies that QUOTED_IDENTIFIERS is set OFF for each connection. SQL Server then follows the legacy Transact-SQL rules regarding the use of quotation marks in SQL statements.
RegionalyesRespect client workstation settings for region when converting date, time, and currency values to character strings. This setting should only be specified for applications that only display data, not for applications that process data.
 noDefault. Use ODBC-defined character formats for date, time, and money conversion.
Server Name of a server running SQL Server on the network. The value must be either the name of a server on the network, or the name of a SQL Server Client Network Utility advanced server entry. You can enter (local) as the server name on Windows NT 4.0 to connect to a copy of SQL Server running on the same computer. SQL Server 2000 supports multiple instances of SQL Server running on the same computer. To specify a named instance of SQL Server, the server name is specified as ServerName/InstanceName. For more information about server names, see Managing Clients.
StatsLog_OnyesEnables driver performance logging.
 noDefault. Disables driver performance logging.
StatsLogFile Full path and name of the file used to record SQL Server ODBC driver performance statistics.
Trusted_ConnectionyesWindows Authentication is enabled for the data source.
 noDefault. SQL Server Authentication is enabled for the data source. A SQL Server login and password must be specified for each connection.
UseProcForPrepare0Temporary stored procedures are not created on statement preparation.
(SQL Server 6.5 or earlier only)1Default. Temporary stored procedures are created for prepared SQL statements. The procedures are dropped when the connection is closed or lost.
 2Temporary stored procedures are created for prepared SQL statements. The procedures are dropped when the cursor is closed.

 

The driver uses the locale registry settings for the current user. The driver does not honor the current thread's locale if the application sets it after connection by, for example, calling SetThreadLocale.

Altering the regional behavior of a data source can cause application failure. An application that parses date strings, and expects date strings to appear as defined by ODBC, could be adversely affected by altering this value.

Note  Regional conversion settings apply to currency, numeric, date, and time data types. The conversion setting is only applicable to output conversion and is only visible when currency, numeric, date, or time values are converted to character strings.
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值