1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
| *TableFixNull('teklif',.t.)
Function TableFixNull
Lparameters fname,lcparam2
Lczaman=Seconds()
If Empty(fname)
Messagebox(fname +' Kayıt Bulunamadı')
Return
Endif
If !Empty(lcparam2)
DosyaAc(fname,,.T.)
Endif
Wait Window fname Nowa
Set Escape On
Private nfields, Afields, Lcf
Select (fname)
nfields = Afields(aflds)
Go Top
Lcsayi=0
Scan
For Lcf = 1 To nfields
lcbaslik=aflds(Lcf, 1)
If Isnull(&lcbaslik)=.F. And Upper(aflds(Lcf,2))=='T'
LCalan1=m.fname+'.'+Lower(aflds(Lcf, 1))
If &LCalan1=Datetime(1900,01,01,00,00,00)
Lcdeger=Ctot('//')
lcsorgu3='repl &LCalan1 with Lcdeger'
&lcsorgu3
Endif
Endif
If Isnull(&lcbaslik)=.T.
Lcsayi=Lcsayi+1
Do Case
Case Upper(aflds(Lcf,2))=='C'
Lcdeger=" "
Case Upper(aflds(Lcf,2))=='I'
Lcdeger=0
Case Upper(aflds(Lcf,2))=='N'
Lcdeger=0
Case Upper(aflds(Lcf,2))=='L'
Lcdeger=0
Case Upper(aflds(Lcf,2))=='M'
Lcdeger=" "
Case Upper(aflds(Lcf,2))=='D'
Lcdeger=Ctod('//')
Case Upper(aflds(Lcf,2))=='T'
Lcdeger=Ctot('//')
Case Upper(aflds(Lcf,2))=='B'
Lcdeger=0
Otherwise
Wait Window (Upper(aflds(Lcf,2))) Nowa
Messagebox('HAta')
Endcase
Wait Window (Upper(aflds(Lcf,2))) Nowa
LCalan1=m.fname+'.'+Lower(aflds(Lcf, 1))
lcsorgu3='repl &LCalan1 with Lcdeger'
&lcsorgu3
Endif
Endfor
Select (fname)
Endscan
Select (fname)
Go Top
If !Empty(lcparam2)
If Tableupdate(.T.,.T.,fname)
Wait Window 'Kayit tamam...' Nowa
Else
Wait Window 'Kayit HAtalı...'
Endif
Endif
Wait Window Lcsayi Nowa
Endfunc |