Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2002.01.31;
Скачать: CL | DM;

Вниз

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

 
ЕвгенийА   (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;
Скачать: CL | DM;

Наверх




Память: 0.48 MB
Время: 0.011 c
4-100117
Cobalt
2001-11-25 19:44
2002.01.31
Как работать с этим проклятым PChar?


4-100100
DenKop
2001-11-30 23:33
2002.01.31
Вывод текста через контекст устройства...


1-99941
Yakudza
2002-01-12 16:22
2002.01.31
Как добавить символ табуляции в строку ?


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


3-99875
МаксБ
2001-12-27 11:20
2002.01.31
Paradox