powered by simpleCommunicator - 2.0.60     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Delphi [игнор отключен] [закрыт для гостей] / Создание таблицы DBF програмного
6 сообщений из 6, страница 1 из 1
Создание таблицы DBF програмного
    #32369066
Valdemar
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Что то везде примеры только к paradox. А нужно dBase, хочу сделать аналогично
...
Рейтинг: 0 / 0
Создание таблицы DBF програмного
    #32369096
pkarklin
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
CREATE TABLE в хелпе по LocalSQL не смотрели?
...
Рейтинг: 0 / 0
Создание таблицы DBF програмного
    #32369113
Valdemar
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
не могу найти, ни как, подскажи
...
Рейтинг: 0 / 0
Создание таблицы DBF програмного
    #32369132
Фотография Luchkin Dmitry
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
а если взять пример paradox и вместо .db написать .dbf? ;-)
...
Рейтинг: 0 / 0
Создание таблицы DBF програмного
    #32369133
pkarklin
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Creates a table.

CREATE TABLE table_reference (column_definition [, column_definition,...] [, primary_key_constraint])

Description

Use the CREATE TABLE statement to create a dBASE or Paradox table, define its columns, and define a primary key constraint.

The table name reference for CREATE TABLE must comply with the rules described in the section on naming conventions. Table names with embedded spaces must be enclosed in quotation marks.

Column definitions consist of a comma-separated list of combinations of column name, data type, and (if applicable) dimensions. The list of column definitions must be enclosed in parentheses. The number and type of dimensions that must be specified varies with column type. See the section on defining column types for specific syntax of all supported column types.

Use the PRIMARY KEY (or CONSTRAINT) keyword to create a primary index for the new table.The following statement creates a Paradox table with a PRIMARY KEY constraint on the LAST_NAME and FIRST_NAME columns:

CREATE TABLE "employee.db"

(
Last_Name CHAR(20),
First_Name CHAR(15),
Salary NUMERIC(10,2),
Dept_No SMALLINT,
PRIMARY KEY (Last_Name, First_Name)

)

An alternate syntax for creating a primary key constraint is using the CONSTRAINT keyword. While Paradox primary indexes do not have names, an arbitrary name needs to be provided to satisfy the CONSTRAINT keyword need for a token name.

CREATE TABLE "employee.db"

(
Last_Name CHAR(20),
First_Name CHAR(15),
Salary NUMERIC(10,2),
Dept_No SMALLINT,
CONSTRAINT z PRIMARY KEY (Last_Name, First_Name)

)

Indicate whether the table is a Paradox or dBASE table by specifying the file extension when naming the table:

".DB" for Paradox tables
".DBF" for dBASE tables

If you omit the file extension for a local table name, the table created is the table type specified in the Default Driver setting in the System INIT page of the BDE Administrator utility. When specifying a file extension, the table name reference for CREATE TABLE must be enclosed in quotation marks.

Column definitions based on domains are not supported. Primary keys are the only form of constraint that can be defined with CREATE TABLE.

Note To create a table with columns that have non-alphanumeric characters or spaces in the column name, you must enclose the column name in quotation marks and prefix the quoted column name with the table name in quotes (if the filename extension is included) or just the table name. Any one of the three variations below are acceptable.

CREATE TABLE "abc.db"

(
ID CHAR(3),
"ABC.db"."Funny Name" CHAR(10)

)

CREATE TABLE abc

(
ID CHAR(3),
ABC."Funny Name" CHAR(10)

)

CREATE TABLE "abc.db"

(
ID CHAR(3),
ABC."Funny Name" CHAR(10)

)
...
Рейтинг: 0 / 0
Создание таблицы DBF програмного
    #32369313
Valdemar
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Спасибо
...
Рейтинг: 0 / 0
6 сообщений из 6, страница 1 из 1
Форумы / Delphi [игнор отключен] [закрыт для гостей] / Создание таблицы DBF програмного
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]