![]() |
|
|
![]()
|
|
| Insert |
|
|||
![]() Бывалый ![]() Профиль Группа: Участник Сообщений: 208 Регистрация: 13.4.2006 Репутация: нет Всего: 1 |
Здравствуйте,
Вот настал момент, когда надо создать таблицу программно, я почитал некоторые материалы по этому поводу вроде сделал как написано, а таблица не создается и компилятор выдает такую ошибку: "Capability not supported", помогите разобраться. Вот код создания:
ЗЫ: Таблица не активна, алиасов не создавал (и не буду). Это сообщение отредактировал(а) Insert - 6.7.2006, 12:41 --------------------
пьяный русский кодер практически непобедим |
|||
|
||||
| Vit |
|
|||
![]() Vitaly Nevzorov ![]() ![]() ![]() ![]() Профиль Группа: Экс. модератор Сообщений: 10964 Регистрация: 25.3.2002 Где: Chicago Репутация: 14 Всего: 207 |
Попробуй создать SQL запросом
-------------------- With the best wishes, Vit I have done so much with so little for so long that I am now qualified to do anything with nothing Самый большой Delphi FAQ на русском языке здесь: www.drkb.ru |
|||
|
||||
| Insert |
|
|||
![]() Бывалый ![]() Профиль Группа: Участник Сообщений: 208 Регистрация: 13.4.2006 Репутация: нет Всего: 1 |
SQL, пока не знаю БД недавно начал, но если лучше ниче не предложат, то наверно придется sql.
Добавлено @ 17:01 Ещё интересно, что даже если БД создастся, то в каком месте? --------------------
пьяный русский кодер практически непобедим |
|||
|
||||
| Poseidon |
|
|||
![]() Delphi developer ![]() ![]() ![]() ![]() Профиль Группа: Комодератор Сообщений: 5273 Регистрация: 4.2.2005 Где: Гомель, Беларусь Репутация: 3 Всего: 133 |
-------------------- Если хочешь, что бы что-то работало - используй написанное, если хочешь что-то понять - пиши сам... |
|||
|
||||
| Albinos_x |
|
|||
![]() Evil Skynet ![]() ![]() ![]() ![]() Профиль Группа: Комодератор Сообщений: 3288 Регистрация: 28.5.2004 Где: X-6120400 Y-1 4624650 Репутация: 1 Всего: 108 |
может стоит добавить:
-------------------- "Кто владеет информацией, тот владеет миром" Уинстон Черчилль |
|||
|
||||
| Ramin |
|
|||
|
Новичок Профиль Группа: Участник Сообщений: 23 Регистрация: 17.7.2006 Где: Азербаиджан, Баку Репутация: нет Всего: нет |
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) ) |
|||
|
||||
| Akella |
|
|||
![]() Творец ![]() ![]() ![]() ![]() Профиль Группа: Модератор Сообщений: 18485 Регистрация: 14.5.2003 Где: Корусант Репутация: 29 Всего: 329 |
|
|||
|
||||
![]()
|
| Правила форума "Delphi: Базы данных и репортинг" | |
|
|
Запрещено: 1. Публиковать ссылки на вскрытые компоненты 2. Обсуждать взлом компонентов и делиться вскрытыми компонентами Обязательно указание: 1. Базы данных (Paradox, Oracle и т.п.) 2. Способа доступа (ADO, BDE и т.д.)
FAQ раздела лежит здесь! Если Вам помогли и атмосфера форума Вам понравилась, то заходите к нам чаще! С уважением, Vit, Петрович. |
| 0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей) | |
| 0 Пользователей: | |
| « Предыдущая тема | Delphi: Базы данных и репортинг | Следующая тема » |
|
|
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности Powered by Invision Power Board(R) 1.3 © 2003 IPS, Inc. |