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

Вниз

Запись в поле...   Найти похожие ветки 

 
ЕвгенийА   (2001-12-30 19:06) [0]

Не могу записать в поле,
посмотрите что не так...
Ошибку пишет что-то вроде того что не дан доступ для редактирования....
вот:


Form6.Table1.Edit;
Form6.Table1.First;
for j:=1 to Form6.Table1.RecordCount do begin
if j=1 then
Form6.Table1.FieldByName("Col").Asinteger:=N;
if j=2 then
Form6.Table1.FieldByName("Col").Asinteger:=round(u10[t]);
if j=3 then
Form6.Table1.FieldByName("Col").Asinteger:=round(u12[t]);
if j=4 then
Form6.Table1.FieldByName("Col").Asinteger:=round(u13[t]);
if j=5 then
Form6.Table1.FieldByName("Col").Asinteger:=round(u14[t]);
if j=6 then
Form6.Table1.FieldByName("Col").Asinteger:=round(u15[t]);
if j=7 then
Form6.Table1.FieldByName("Col").Asinteger:=round(u16[t]);
if j=8 then
Form6.Table1.FieldByName("Col").Asinteger:=round(u17[t]);
if j=9 then
Form6.Table1.FieldByName("Col").Asinteger:=round(u18[t]);
if j=10 then
Form6.Table1.FieldByName("Col").Asinteger:=round(u19[t]);
if j=11 then
Form6.Table1.FieldByName("Col").Asinteger:=round(sumU1[t]);
if j=12 then
Form6.Table1.FieldByName("Col").Asinteger:=round(sumU2[t]);
if j=13 then
Form6.Table1.FieldByName("Col").Asinteger:=round(i20[t]);
if j=14 then
Form6.Table1.FieldByName("Col").Asinteger:=round(i22[t]);
if j=15 then
Form6.Table1.FieldByName("Col").Asinteger:=round(i23[t]);
if j=16 then
Form6.Table1.FieldByName("Col").Asinteger:=round(i24[t]);
if j=17 then
Form6.Table1.FieldByName("Col").Asinteger:=round(i25[t]);
if j=18 then
Form6.Table1.FieldByName("Col").Asinteger:=round(sumI1[t]);
if j=19 then
Form6.Table1.FieldByName("Col").Asinteger:=round(sumI2[t]);




Form6.Table1.Next;
end;

Form6.Table1.Post;


 
panov   (2001-12-30 19:09) [1]

Edit выдается на каждую редактируемую запись.
Точно так же, как и Post.


 
Wizard_Ex   (2002-01-02 13:49) [2]

Form6.Table1.First;
for j:=1 to Form6.Table1.RecordCount do begin
Form6.Table1.Edit;
if j=1 then
Form6.Table1.FieldByName("Col").Asinteger:=N;
if j=2 then
Form6.Table1.FieldByName("Col").Asinteger:=round(u10[t]);
if j=3 then
Form6.Table1.FieldByName("Col").Asinteger:=round(u12[t]);
if j=4 then
Form6.Table1.FieldByName("Col").Asinteger:=round(u13[t]);
if j=5 then
Form6.Table1.FieldByName("Col").Asinteger:=round(u14[t]);
if j=6 then
Form6.Table1.FieldByName("Col").Asinteger:=round(u15[t]);
if j=7 then
Form6.Table1.FieldByName("Col").Asinteger:=round(u16[t]);
if j=8 then
Form6.Table1.FieldByName("Col").Asinteger:=round(u17[t]);
if j=9 then
Form6.Table1.FieldByName("Col").Asinteger:=round(u18[t]);
if j=10 then
Form6.Table1.FieldByName("Col").Asinteger:=round(u19[t]);
if j=11 then
Form6.Table1.FieldByName("Col").Asinteger:=round(sumU1[t]);
if j=12 then
Form6.Table1.FieldByName("Col").Asinteger:=round(sumU2[t]);
if j=13 then
Form6.Table1.FieldByName("Col").Asinteger:=round(i20[t]);
if j=14 then
Form6.Table1.FieldByName("Col").Asinteger:=round(i22[t]);
if j=15 then
Form6.Table1.FieldByName("Col").Asinteger:=round(i23[t]);
if j=16 then
Form6.Table1.FieldByName("Col").Asinteger:=round(i24[t]);
if j=17 then
Form6.Table1.FieldByName("Col").Asinteger:=round(i25[t]);
if j=18 then
Form6.Table1.FieldByName("Col").Asinteger:=round(sumI1[t]);
if j=19 then
Form6.Table1.FieldByName("Col").Asinteger:=round(sumI2[t]);
Form6.Table1.Post;
Form6.Table1.Next;
end;

Думаю вообще что case лучше подойдет...

типа
case Form6.Table1.FieldByName("Col").Asinteger of
1 : Form6.Table1.FieldByName("Col").Asinteger:=N;
2 : Form6.Table1.FieldByName("Col").Asinteger:=round(u10[t]);
3 : Form6.Table1.FieldByName("Col").Asinteger:=round(u12[t]);
else xxxx
end;

......



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

Форум: "Базы";
Текущий архив: 2002.01.31;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.45 MB
Время: 0.005 c
3-99908
dmitryK
2001-12-29 12:43
2002.01.31
Через BDE к MSSQL6.5 в Delphi 6


3-99861
Алексей Акиньхов
2001-12-26 14:34
2002.01.31
Преобразование dbf файлов


4-100120
Crafox
2001-12-04 19:51
2002.01.31
Блокировка сочетаний типа Win+M и т.п.


7-100086
Кенгуру
2001-10-14 16:58
2002.01.31
Как из Дельфи отследить нажатия на клавиши MIDI клавиатуры ?


4-100113
vic_774N
2001-12-03 14:47
2002.01.31
Delphi IDE - а попробуйте-ка послать текст в редактор !!!





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
Английский Французский Немецкий Итальянский Португальский Русский Испанский