kaydı güncelle butonuna basmadan formdan çıkıyorum burdada herşey normal.
tekrar düzenle diye formu açıyorum yine herşey normal.
güncelle butonuna basıyorum kaydı kaydediyo formu kapatıyor buda normal.
sorun burda başlıyor
tekrar düzenleye bastığımda herhangi bir kayıtta olsa
Query Must Return exactly result set - use execute Hatası veriyor.
her yöntemi denedim çözemedim. execute çalıştırdım. execsql çalıştırdım olmadı. kaydı güncele butonuna basıp tekrar kaydı açarsam sorun yok.
ilk defa karşılaşıyorum bu hatayla karşılaşan varmı aranızda.
güncelle butonu kodları.
Kod: Tümünü seç
procedure TForm31.rztoolbutton1Click(Sender: TObject);
var
a,b:integer;
begin
if (trim(cxcombobox1.Text)='') then
begin
Application.MessageBox('Personel Adını Giriniz!',
'Kayıt Kontrol',
MB_OK+
MB_ICONEXCLAMATION+
MB_DEFBUTTON1+
MB_SYSTEMMODAL);
cxcombobox1.SetFocus();
end
else if (trim(cxbuttonedit1.Text)='') then
begin
Application.MessageBox('Müşteri Adını Giriniz!',
'Kayıt Kontrol',
MB_OK+
MB_ICONEXCLAMATION+
MB_DEFBUTTON1+
MB_SYSTEMMODAL);
cxbuttonedit1.SetFocus();
end
else if (trim(cxtextedit3.Text)='') then
begin
Application.MessageBox('TC/Vergi No Giriniz!',
'Kayıt Kontrol',
MB_OK+
MB_ICONEXCLAMATION+
MB_DEFBUTTON1+
MB_SYSTEMMODAL);
cxtextedit3.SetFocus();
end
else if (trim(cxtextedit5.Text)='') then
begin
Application.MessageBox('Telefon Numarası Giriniz!',
'Kayıt Kontrol',
MB_OK+
MB_ICONEXCLAMATION+
MB_DEFBUTTON1+
MB_SYSTEMMODAL);
cxtextedit5.SetFocus();
end
else if (trim(cxtextedit8.Text)='') then
begin
Application.MessageBox('Mail Adresini Giriniz!',
'Kayıt Kontrol',
MB_OK+
MB_ICONEXCLAMATION+
MB_DEFBUTTON1+
MB_SYSTEMMODAL);
cxtextedit8.SetFocus();
end
else if (trim(cxmemo1.Text)='') then
begin
Application.MessageBox('Adres Giriniz!',
'Kayıt Kontrol',
MB_OK+
MB_ICONEXCLAMATION+
MB_DEFBUTTON1+
MB_SYSTEMMODAL);
cxmemo1.SetFocus();
end
else if (trim(cxmemo2.Text)='') then
begin
Application.MessageBox('Açıklama Giriniz!',
'Kayıt Kontrol',
MB_OK+
MB_ICONEXCLAMATION+
MB_DEFBUTTON1+
MB_SYSTEMMODAL);
cxmemo2.SetFocus();
end
else if (trim(edit1.Text)='') then
begin
Application.MessageBox('Belge Türü Giriniz!',
'Kayıt Kontrol',
MB_OK+
MB_ICONEXCLAMATION+
MB_DEFBUTTON1+
MB_SYSTEMMODAL);
end
else if (trim(edit3.Text)='') then
begin
Application.MessageBox('Ödeme Türünü Giriniz!',
'Kayıt Kontrol',
MB_OK+
MB_ICONEXCLAMATION+
MB_DEFBUTTON1+
MB_SYSTEMMODAL);
end
else if (trim(edit4.Text)='') then
begin
Application.MessageBox('Ödeme Durumu Giriniz!',
'Kayıt Kontrol',
MB_OK+
MB_ICONEXCLAMATION+
MB_DEFBUTTON1+
MB_SYSTEMMODAL);
end
else
begin
guncelle.Close;
guncelle.SQL.Clear;
guncelle.SQL.Add('update siparis set tarih='+quotedstr(trim(cxdateedit1.Text))+', personel='+quotedstr(trim(cxcombobox1.Text))+', ckod='+quotedstr(trim(cxtextedit2.Text))+', madi='+quotedstr(trim(cxbuttonedit1.Text))+'');
guncelle.SQL.Add(', mtc='+quotedstr(trim(cxtextedit3.Text))+', mvergi='+quotedstr(trim(cxtextedit4.Text))+', mturu='+quotedstr(trim(cxtextedit11.Text))+', mtelefon='+quotedstr(trim(cxtextedit5.Text))+'');
guncelle.SQL.Add(', mgsm='+quotedstr(trim(cxtextedit6.Text))+', mfax='+quotedstr(trim(cxtextedit7.Text))+', mmail='+quotedstr(trim(cxtextedit8.Text))+', madres='+quotedstr(trim(cxmemo1.Text))+'');
guncelle.SQL.Add(', irsaliye='+quotedstr(trim(edit1.Text))+', ino='+quotedstr(trim(cxtextedit9.Text))+', itarih='+quotedstr(trim(cxdateedit3.Text))+', fatura='+quotedstr(trim(edit2.Text))+'');
guncelle.SQL.Add(', fno='+quotedstr(trim(cxtextedit16.Text))+', ftarih='+quotedstr(trim(cxdateedit4.Text))+', testarih='+quotedstr(trim(cxdateedit5.Text))+', fiyat='+quotedstr(trim(cxcurrencyedit1.Text))+'');
guncelle.SQL.Add(', odeme='+quotedstr(trim(edit3.Text))+', tahsilat='+quotedstr(trim(edit4.Text))+', tahsilattarih='+quotedstr(trim(cxdateedit2.Text))+', aciklama='+quotedstr(trim(cxmemo2.Text))+'');
guncelle.SQL.Add(', sonuc='+quotedstr(trim(cxcombobox4.Text))+', saciklama='+quotedstr(trim(cxmemo3.Text))+', kacan='+quotedstr(trim(cxtextedit12.Text))+' where skod='+quotedstr(trim(cxtextedit1.Text))+'');
guncelle.ExecSQL;
Application.MessageBox('Kayıt Güncellendi...',
'Kayıt Kontrol',
MB_OK+
MB_ICONEXCLAMATION+
MB_DEFBUTTON1+
MB_SYSTEMMODAL);
close;
end;