Главная страница
    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.004 c
3-99890
Sashka
2001-12-28 01:32
2002.01.31
component for MSSql & MySql


1-99942
boriska
2002-01-13 02:47
2002.01.31
обращение к именам


1-99935
veZuk
2002-01-12 12:14
2002.01.31
Параметры запуска


7-100078
Win
2001-10-20 12:38
2002.01.31
реестр


4-100099
VanRain
2001-12-01 15:11
2002.01.31
Инфа по WinAPI





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