Konu: view kayıt yapmıyor.
2 tane formum var.
biri tanım ( listenin bulunduğu)
diğeri giriscikis (veri girişi yapılacan yer.)
tanım ın
data session=2
windowstype=modeless
tablelar view buffermode=5 (view i içeren tableda burada mevcut)
sadece view de nodataonload=.t.
giriscikis ın
data session=1
windowstype=model
autoclose/open=.f.
tanım dan yeni dediğimde;
m.acik=.F.
For Each loForm In _Screen.Forms
If loForm.Name = "KSGIRISCIKIS"
m.acik=.T.
Exit
Endif
Endfor
If m.acik=.F.
Do Form Forms\KSGIRISCIKIS With .T.
Else
_Screen.KSGIRISCIKIS.WindowState = 0
_Screen.KSGIRISCIKIS.Show
Endif
giriscikis init
Parameters param1,param2
Thisform.ilave=param1
Thisform.yeniid=param2
Thisform.LockScreen = .T.
_Screen.AddProperty("KSGIRISCIKIS", Thisform)
If Thisform.ilave=.F.
idsor=Thisform.yeniid
Select KSTOKSATIRV
Tableupdate(.T.)
Requery()
Thisform.txtBelgeno.Value=KSTOKSATIRV.belgeno
Thisform.datepick1.TxtCalendar.Value=KSTOKSATIRV.belgetar
Thisform.txtFirmadi.Value=KSTOKSATIRV.Firmadi
Thisform.datepick2.TxtCalendar.Value=KSTOKSATIRV.gelistar
Else
Thisform.yeniid=newid("KSGIRISCIKIS")
idsor=Thisform.yeniid
Select KSTOKSATIRV
Insert Into KSTOKSATIRV(fisid) Values(Thisform.yeniid)
Endif
Thisform.Edit
Thisform.LockScreen = .F.
Thisform.Refresh
insert into ile satir lar ekliyorum.
kayıt;
Local llOk1,llOk2
Store .F. To llOk1,llOk1
Begin Transaction
Select KSTOKsatirv
m.llOk1= Tableupdate(.T., .T.,"KSTOKsatirv")
m.llOk2= Tableupdate(.T., .T.,"KSTOKsatir")
If m.llOk1 = .T. And m.llOk2 = .T.
End Transaction
Wait Window ('Ok.') Nowait
Else
Aerror(lar1)
Messagebox (Chr(13)+Program(0)+Chr(13)+Program(1)+Chr(13)+Program(2)+Chr(13)+Program(3)+Chr(13)+Program(4)+Chr(13)+Program(5)+Chr(13))
Messagebox ( 'Hata Kodu :'+Alltrim(Str(lar1(1,1)))+Chr(13)+'Hata Açık : ' +Alltrim(lar1(1,2))+Chr(13))
Rollback
=Tablerevert(.T., "KSTOKsatirv")
=Tablerevert(.T., "KSTOKsatir")
Endif
Unlock All
Thisform.Release
Kaydet tıkladığımda veya mevcut bir kaydı açıp birşeyler eklesem bile kayıt yapmıyor.
Normalde KSTOKsatir i kaydettirmeye gerek yok diye düşünüyorum. çözüm bulmak amacı ile koydum.