fox-manager-2.0-bpa:1.-общая-информация:тонкие-настройки-подключения-к-базе-данных
Различия
Показаны различия между двумя версиями страницы.
Предыдущая версия справа и слеваПредыдущая версияСледующая версия | Предыдущая версияСледующая версияСледующая версия справа и слева | ||
fox-manager-2.0-bpa:1.-общая-информация:тонкие-настройки-подключения-к-базе-данных [2020/06/10 23:16] – erazor | fox-manager-2.0-bpa:1.-общая-информация:тонкие-настройки-подключения-к-базе-данных [2023/09/06 19:23] – [Длина текстовых колонок в базах данных по умолчанию] Техподдержка | ||
---|---|---|---|
Строка 3: | Строка 3: | ||
По умолчанию программа Fox Manager уже настроена таким образом, | По умолчанию программа Fox Manager уже настроена таким образом, | ||
+ | ===== Длина текстовых колонок в базах данных по умолчанию ===== | ||
+ | |||
+ | По умолчанию текстовые строки записываются в базу данных как **varchar(255)**, | ||
+ | |||
+ | Обычно такого количества символов хватает, | ||
+ | |||
+ | Для этого необходимо отредактировать файл **Settings.ini**, | ||
+ | |||
+ | Измените значение параметра **DefaultStringColWidth=255** в разделе **[Settings]**. | ||
+ | |||
+ | Для корректной работы необходимо изменить это значение для всех пользователей программы (отредактировать это значение в файле Settings.ini в их папках). Если значение было изменено уже после того, как база данных была создана, | ||
+ | |||
+ | Не рекомендуем без необходимости менять это значение, | ||
===== Проблемы с кодировкой ===== | ===== Проблемы с кодировкой ===== | ||
Среди таких проблем можно отдельно выделить несоответствие кодировки, | Среди таких проблем можно отдельно выделить несоответствие кодировки, | ||
- | В случае возникновения подобных проблем следует прибегнуть к тонкой настройке соединения программы с базой данных. Параметры этих настроек находятся в файле **Connection.ini**, | + | В случае возникновения подобных проблем следует прибегнуть к тонкой настройке соединения программы с базой данных. Параметры этих настроек находятся в файле **Connection.ini**, |
Откройте данный файл, например, | Откройте данный файл, например, | ||
{{ : | {{ : | ||
+ | |||
+ | ===== Проблемы при одновременном доступе к базе SQLite ===== | ||
+ | |||
+ | База данных SQLite является файловой и рекомендуется для работы одного пользователя, | ||
+ | |||
+ | * BusyTimeout = 5000 | ||
+ | * LockingMode = lmNormal | ||
+ | * Synchronous = smExtra | ||
===== Проблемы при подключении к базе MySQL 8.x ===== | ===== Проблемы при подключении к базе MySQL 8.x ===== | ||
Строка 18: | Строка 39: | ||
* Установите в настройках сервера MySQL 8 опцию «Use Legacy Authentication Method». Иногда для этого нужно запустить установку сервера заново и выбрать «Reconfigure» на странице установки/ | * Установите в настройках сервера MySQL 8 опцию «Use Legacy Authentication Method». Иногда для этого нужно запустить установку сервера заново и выбрать «Reconfigure» на странице установки/ | ||
- | * Попробуйте выбрать прямой метод подключения к базу данных. Для этого отредактируйте файл Connection.ini и поставьте значение параметра Direct=True в разделе [MySQL] | + | * Попробуйте выбрать прямой метод подключения к базе данных. Для этого отредактируйте файл Connection.ini и поставьте значение параметра Direct=True в разделе [MySQL] |
* Если подключится к базе прямым методом не удаётся, | * Если подключится к базе прямым методом не удаётся, | ||
Строка 170: | Строка 191: | ||
|MessagesCharset|Specifies the character set that will be used to transfer error messages from the server to the client.| | |MessagesCharset|Specifies the character set that will be used to transfer error messages from the server to the client.| | ||
|IPVersion|Use the IPVersion property to specify the Internet Protocol version. The default value is ivIPv4. **ivIPBoth** Specifies that either IPv6 or IPv4 Internet Protocol version is used. Note: when the TIPVersion property is set to ivIPBoth, there occurs an attempt to connect via IPv6 (if it is enabled in the OS); if the attempt fails - there occurs an attempt to connect via IPv4. **ivIPv4** Specifies that the IPv4 Internet Protocol version is used. **ivIPv6** Specifies that the IPv6 Internet Protocol version is used.| | |IPVersion|Use the IPVersion property to specify the Internet Protocol version. The default value is ivIPv4. **ivIPBoth** Specifies that either IPv6 or IPv4 Internet Protocol version is used. Note: when the TIPVersion property is set to ivIPBoth, there occurs an attempt to connect via IPv6 (if it is enabled in the OS); if the attempt fails - there occurs an attempt to connect via IPv4. **ivIPv4** Specifies that the IPv4 Internet Protocol version is used. **ivIPv6** Specifies that the IPv6 Internet Protocol version is used.| | ||
- | |ProtocolVersion|Specifies protocol version to be used when several versions are available. Supported values: | + | |ProtocolVersion|Specifies protocol version to be used when several versions are available. Supported values: **pv20** Set ProtocolVersion to pv20 to work with PostgreSQL server version 7.3 or older that don't support protocol version 3.0. **pv30** Set ProtocolVersion to pv30 to enforce protocol version 3.0. **pvAuto** (default) Set ProtocolVersion to pvAuto to automatically select between protocol versions depending on the specific query for the best possible performance.| |
- | **pv20** Set ProtocolVersion to pv20 to work with PostgreSQL server version 7.3 or older that don't support protocol version 3.0. **pv30** Set ProtocolVersion to pv30 to enforce protocol version 3.0. **pvAuto** (default) Set ProtocolVersion to pvAuto to automatically select between protocol versions depending on the specific query for the best possible performance.| | + | |ProxyHostname|Use the ProxyHostName option to specify the host name or IP address to connect to the proxy server.| |
+ | |ProxyPassword|Use the ProxyPassword option to specify the password for the proxy server.| | ||
+ | |ProxyPort|Use the ProxyPort option to specify the port for a TCP/IP connection with the proxy server.| | ||
+ | |ProxyUsername|Use the ProxyUsername option to specify the username for the proxy server.| | ||
|Schema|Use the Schema property to set the search path for the connection to the specified schema. This setting offers a convenient way to perform operations on objects in a schema other than that of the current user without having to qualify the objects with the schema name.| | |Schema|Use the Schema property to set the search path for the connection to the specified schema. This setting offers a convenient way to perform operations on objects in a schema other than that of the current user without having to qualify the objects with the schema name.| | ||
|SSLCACert|The pathname to the certificate authority file.| | |SSLCACert|The pathname to the certificate authority file.| | ||
Строка 177: | Строка 201: | ||
|SSLChipherList|The list of allowable ciphers to use for SSL encryption.| | |SSLChipherList|The list of allowable ciphers to use for SSL encryption.| | ||
|SSLKey|The pathname to the key file.| | |SSLKey|The pathname to the key file.| | ||
- | |SSLMode|This option determines whether or with what priority an SSL connection will be negotiated with the server. If PostgreSQL is compiled without SSL support, using option smRequire will cause an error, while options smAllow and smPrefer will be accepted, but PgDAC will not in fact attempt an SSL connection. | + | |SSLMode|This option determines whether or with what priority an SSL connection will be negotiated with the server. |
+ | |UseHttp|The UseHttp option enables the use of HTTP tunneling to connect to the server. The default value is False.| | ||
+ | |UuidWithBraces|Use the UuidWithBraces option to specify whether the values of UUID fields are returned with braces. The default value is True.| | ||
|UseUnicode|Enables or disables Unicode support. Affects character data fetched from the server. When set to True, all character data is stored as WideStrings, | |UseUnicode|Enables or disables Unicode support. Affects character data fetched from the server. When set to True, all character data is stored as WideStrings, | ||
Строка 184: | Строка 210: | ||
|ASCIIDataBase|Enables or disables ASCII support. The default value is False. Note:For this option usage set the UseUnicode option to false.| | |ASCIIDataBase|Enables or disables ASCII support. The default value is False. Note:For this option usage set the UseUnicode option to false.| | ||
|BusyTimeout|Use the ClientLibrary option to set or get the timeout of waiting for locked resource (database or table). If resource is not unlocked during the time specified in BusyTimeout, | |BusyTimeout|Use the ClientLibrary option to set or get the timeout of waiting for locked resource (database or table). If resource is not unlocked during the time specified in BusyTimeout, | ||
+ | |CipherLicense|Holds a license key for SQLCipher Commercial Edition. Note that SQLCipher is not supported in the Direct mode.| | ||
+ | |ConnectMode|The connection mode. **cmDefault** - The default value. The database is opened for reading and writing. Corresponds to the SQLite default behavior. **cmReadWrite** - The database is opened for reading and writing. **cmReadOnly** - The database is opened in read-only mode.| | ||
|ClientLibrary|Use the ClientLibrary option to set or get the client library location.| | |ClientLibrary|Use the ClientLibrary option to set or get the client library location.| | ||
|DateFormat|Defines the format for storing dates in the database. If it is not specified, the default yyyy-mm-dd format will be used. | | |DateFormat|Defines the format for storing dates in the database. If it is not specified, the default yyyy-mm-dd format will be used. | | ||
Строка 194: | Строка 222: | ||
|ForegnKeys|Enables or disables the enforcement of foreign key constraints. Foreign key constraints are disabled by default in SQLite, so this option can be used to force enabling or disabling them by the application. Default value of this option is True.| | |ForegnKeys|Enables or disables the enforcement of foreign key constraints. Foreign key constraints are disabled by default in SQLite, so this option can be used to force enabling or disabling them by the application. Default value of this option is True.| | ||
|ForceCreateDatabase|Used to force TLiteConnection to create a new database before opening a connection, if the database does not exist.| | |ForceCreateDatabase|Used to force TLiteConnection to create a new database before opening a connection, if the database does not exist.| | ||
+ | |JournalMode|The journal mode. **jmDelete** - The rollback journal is deleted at the conclusion of each transaction. **jmTruncate** - The rollback journal is stored in volatile RAM. It reduces disk I/O, but decreases database safety and integrity. If the application using SQLite crashes in the middle of a transaction, | ||
+ | |LockingMode|The database locking mode. **lmExclusive** - The database connection never releases file locks. The first time the database is read or written in this mode, a shared lock is obtained and held. Use this mode if you want to prevent other processes from accessing the database file, reduce the number of filesystem operations, or access WAL databases without using the shared memory. **lmNormal** - The database connection unlocks the database file at the conclusion of each read or write transaction.| | ||
+ | |NativeDate|If the option is set to True, the date and time values will be stored in the database in the native SQLite format, and when retrieved, they will be converted to the TDateTime type. If set to False, no conversion to the TDateTime type will be made. The default value is True.| | ||
|ReadUncommitted|Enables or disables Read-Uncommitted isolation mode. A database connection in read-uncommitted mode does not attempt to obtain read-locks before reading from database tables as described above. This can lead to inconsistent query results if another database connection modifies a table while it is being read, but it also means that a read-transaction opened by a connection in read-uncommitted mode can neither block nor be blocked by any other connection. Default value of this option is False. | |ReadUncommitted|Enables or disables Read-Uncommitted isolation mode. A database connection in read-uncommitted mode does not attempt to obtain read-locks before reading from database tables as described above. This can lead to inconsistent query results if another database connection modifies a table while it is being read, but it also means that a read-transaction opened by a connection in read-uncommitted mode can neither block nor be blocked by any other connection. Default value of this option is False. | ||
+ | |Synchronous|The database synchronization mode when writing to disk. **smOff** - The database engine continues without syncing after handing data off to the operating system. If the application running SQLite crashes, the data will safe, unless the operating system crashes or the computer loses power before data has been written to disk, in which case the database might become corrupted. This is the fastest mode. **smNormal** - The database engine still syncs at the most critical moments, but less often than in the FULL mode. The Normal mode is faster than the Full mode. When using the WAL mode (and probably the DELETE mode) with synchronous=NORMAL, | ||
|TimeFormat|Defines the format for storing time in the database. If it is not specified, the default hh24:mi:ss format will be used. | | |TimeFormat|Defines the format for storing time in the database. If it is not specified, the default hh24:mi:ss format will be used. | | ||
- | |UseUnicode|Enables or disables Unicode support. Affects character data fetched from the server. When set to True, all character data is stored as WideStrings, and TStringField is replaced by TWideStringFiled.| | + | |UseUnicode|Enables or disables Unicode support. When set to True, all character data is stored as WideString, and TStringField is used instead of TWideStringField. The default value is False.| |
\\ | \\ | ||
fox-manager-2.0-bpa/1.-общая-информация/тонкие-настройки-подключения-к-базе-данных.txt · Последнее изменение: 2024/05/12 19:35 — 127.0.0.1