SET NAMES (Reference)
Specifies an active character set to use for subsequent database attachments. Available in
SET NAMES [charset | :var];
Name of a character set that identifies the active character set for a given process; default:
Host variable containing string identifying a known character set name
SET NAMES specifies the character set to use for subsequent database attachments in an application. It enables the server to translate between the default character set for a database on the server and the character set used by an application on the client.
SET NAMES must appear before the
SET DATABASE and
CONNECT statements are affected.
For a complete list of character sets recognized by InterBase, see Character Sets and Collation Orders. Choice of character sets limits possible collation orders to a subset of all available collation orders. Given a specific character set, a specific collation order can be specified when data is selected, inserted, or updated in a column.
Example: The following statements demonstrate the use of
SET NAMES in an embedded SQL application:
EXEC SQL SET NAMES ISO8859_1; EXEC SQL SET DATABASE DB1 = 'employee.ib'; EXEC SQL CONNECT;
The next statements demonstrate the use of
SET NAMES in
SET NAMES LATIN1; CONNECT 'employee.ib';