18th Chapter-delphi Client Server application Development (II.) (3)

Source: Internet
Author: User
Tags character set driver manager range

18.2.2.1 Configure the SQL link driver default settings method

The SQL link driver default setting is the parameter settings in the drivers page of the BDE Configuration tool, which are used in creating a new alias. An alias is a set of parameters that describe a network resource. The BDE application uses the alias to join the shared database. The alias is not necessary to access the local database, but it is essential to access the SQL database.

The default setting for the SQL links driver is the prototype of the new alias you are creating. Although you can customize it after you create the alias, it is easy to set the default settings before creating a new alias. Because each alias that is established will inherit these settings.

To describe the default settings for a driver, complete the following:

Move the light bar to the driver's entry, and the driver Manager displays all of the driver's configuration parameters, which can be used to inspect the configuration parameters at the table end of the parameter list.

If you need to edit the driver's default configuration parameters, if the cursor is stopped in this box, the configuration will automatically apply the default parameters

When this work is done, choose file| Save, the modification will take effect the next time the application starts

18.2.2.2 the meaning of the default settings item for the SQL links driver

1. VERSION

The version number of the SQL links driver.

2. TYPE

Describes the current driver type. Server indicates that the driver is used to connect to a SQL Server, and file indicates that the driver is used to connect a standard file-based server.

3. DLL options

The dynamic link library name of the 16-bit driver for the selected SQL links.

4. DLL32

The dynamic link library name of the 32-bit driver for the selected SQL links.

5. DRIVER Fiags

The internal Product Description logo.

6. TRACE MODE

Describe the type of record tracking information

7. SERVER NAME

Specifies the destination SQL Server name. If specified as the InterBase server, the entire path to the database file is included, Servername:/usr/gds/directoryname/databasenam.gdb

8. USER NAME

The default user name to access the SQL Server.

9. OpenMode

OpenMode is the read-write mode when SQL links opens an SQL database. The value can be read/write or read only, and the default value is Read/write. Setting open mode to read only affects the operation of the client, but has no effect on the SQL Server.

SCHEMA CACHE SIZE

The number of SQL tables that describe the stored view information. The value range is 0-32, and the default value is 8.

Langdriver.

The language driver that is used to manipulate data from the SQL Server. When the cursor stops langdriver the field, a scroll box appears to the left of the body field, with the roller bar available for your driver's optional language list. If you use American English, the default is a space.

When the language driver described is compatible with a server alias, your application will use the driver to process data sent from the server. This includes all the tables you see and the results tables returned by all queries. Servers running on different systems use character set conversions to determine how data is encoded. If you operate in a non-English environment, your BDE application can use a character set that is different from the SQL Server. If the character set on your platform does not match the SQL Server, passing data between the two different platforms causes the following problems:

The data is not displayed correctly on your platform.

Wrong characters will be logged on SQL database

To prevent this, SQL links provides language drivers that implement data conversion for your application's character set and SQL database's character set. This will enable the data from the SQL Server to be displayed correctly on your platform, or send the data you enter reliably to the server.

The language driver contains information about sorting and capitalization conversions. Whenever a query to a SQL database is processed by the rules of the local database, the language driver for the application is used to evaluate the range of characters for sorting. If the sort and capitalization conversions on the platform are different from the SQL Server, your application will display inconsistent results.

If the SQL database uses the extended character set, be sure that the alias used to access the SQL service is described correctly, and the character set of the driver selected by the SQL Links language version should be the same as the SQL Server. If you do not find the appropriate SQL links language driver, you can modify the Sqlqrymode entry in the alias to prevent the query from being processed by local database rules.

Sqlpassthru MODE

Describes whether the application accesses the SQL Server with platform commands and pass-through SQL. The value ranges and their meanings are listed in the following table:

Table 18.3 Sqlpassthru Mode setting

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Set meaning

──────────────────────────────────────

Not shared transitive SQL and non-transitive SQL does not share the same connection

SHARED autocommit default value. Passing SQL and non-transitive SQL will share the same connection, passing

The recursive SQL will act in a manner similar to the non transitive SQL. I'll tell you what.

The user's pass-through SQL expression is automatically committed.

Shared noautocommit transitive SQL and non-transitive SQL will share the same connection, but SQL

The driver does not automatically submit an SQL expression. In this mode, the biography

The recursive behavior is server independent.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The shared autocommit and shared noautocommit modes do not support all transitive expressions. When a shared autocommit or shared Noautocommit mode is set, the transaction control language is not required to execute in transitive SQL. Use your BDE application programming language to start and submit loopback transactions. When transitive SQL and non-transitive SQL share a connection, record fast saves do not immediately reflect updates that pass SQL operations.

Sqlqrymode

Describes how to process query SQL data. The value range meaning is listed in the following table, and the default value is null:

Table 18.4 Sqlqrymode Settings

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Set mode meaning

──────────────────────────────────────

NULL server-local in server-local, query-mode queries are first passed to the SQL service

If the server cannot execute the query, the query is locally enforced

Yes.

SERVER server-only in server-only query mode, query sent to SQL service

Manager If the server cannot execute the query, the local query is not executed.

Local local-only in local-only mode, the query always executes locally.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Normally, the query SQL database is processed on the database server side. In some cases, however, the results of queries executed entirely on the SQL Server are different from the results of queries executed locally. For example, your BDE application query function performs sensitive searches in the case of Word value field. If the server does not support case sensitive searching, then the criteria for the SELECT statement such as ">a" in different places will produce different results. If you want to make sure that all queries from the BDE application are executed according to the rules on the SQL Server, you should configure the SQL links driver appropriately to prevent local processing of the query. By using the BDE Configuration tool to modify the SQL database alias, you can do this by setting the SQL Qrymode to server. The new Sqlqrymode value will take effect the next time the application starts.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.