Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Начинающим";
Текущий архив: 2007.03.25;
Скачать: [xml.tar.bz2];

Вниз

TQuery   Найти похожие ветки 

 
Slimer ©   (2007-02-28 18:27) [0]

Скажите как с помощью TQuery вставлять записи в таблицу?
Не SQL запросом.
процедуры инсерт и пост у него есть, а при попытке вставить запись  сообщение "тиблица открыта только для чтения".
Свойства TableName или ReadOnly у него нету.
Можно ли этот компонент использовать для добавления записей с помощью Insert или Append?
Если да, то где я что не так сделал?


 
Jeer ©   (2007-02-28 18:31) [1]


> где я что не так сделал?


Все.

qu.SQL.Text :="INSERT INTO...";
qu.ExecSQL;

т.е. учим SQL-язык


 
Slimer ©   (2007-02-28 18:39) [2]

С помощью SQL я знаю как добавлять.
Я имел ввиду можно ли это делать процедурами Insert или Append?


 
Ega23 ©   (2007-02-28 19:03) [3]


> С помощью SQL я знаю как добавлять.
> Я имел ввиду можно ли это делать процедурами Insert или
> Append?



Inserts a new, empty record in the dataset.

Delphi syntax:

procedure Insert;

Description

Call Insert to:

1 Open a new, empty record in the dataset.
2 Set the active record to the new record.

After a call to Insert, an application can allow users to enter data in the fields of the record, and then post those changes to the database or change log using Post. (Client datasets can subsequently apply updates in the change log back to the database by calling ApplyUpdates.) A newly inserted record is posted in one of three ways:

For Paradox tables with primary indexes, the record is inserted into the dataset in a position based on its index.
For Paradox tables without primary indexes, the record is inserted into the dataset at the current position.
For dBASE, FoxPro, and Access tables, the record is physically appended to the dataset at the end. If an index happens to be active, the new record may appear in a position relative to the index, but the record is still actually stored at the end of the table.

For SQL databases, the physical location of the insert is implementation-specific. For indexed tables, the index is updated with the new record information.


 
Desdechado ©   (2007-02-28 19:19) [4]

> "тиблица открыта только для чтения".
Нет такого сообщения у БДЕ.
Телепатирую - нередактируемый датасет (получается от использования запроса к нескольким таблицам) можно редактировать, используя TUpdateSQL.


 
evvcom ©   (2007-03-01 10:48) [5]

> [4] Desdechado ©   (28.02.07 19:19)

+ CachedUpdates



Страницы: 1 вся ветка

Форум: "Начинающим";
Текущий архив: 2007.03.25;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.45 MB
Время: 0.044 c
15-1172409457
Par
2007-02-25 16:17
2007.03.25
как скачивать фильмы чтобы провайдер не понял что это фильмы


2-1172873525
pasha star
2007-03-03 01:12
2007.03.25
как вставить звук .wav в .exe ?


2-1172812629
Atanas
2007-03-02 08:17
2007.03.25
Закрытие формы


2-1172760724
проходил мимо решил заглянуть
2007-03-01 17:52
2007.03.25
listbox


15-1172501155
Германн
2007-02-26 17:45
2007.03.25
Бабуины, бабуины. Вот шимпанзе - это да!





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский