forked from VFPX/CCPropsViewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.PRG
78 lines (56 loc) · 1.53 KB
/
test.PRG
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
72
73
74
75
76
77
78
LOCAL lcPath,loADO,loRS
LOCAL ARRAY laObj(5)
lcPath=SYS(16)
lcPath=IIF(RAT("\",lcPath)>0,LEFT(lcPath,RAT("\",lcPath)),lcPath)
SET PATH TO (lcPath)
SET DEFA TO (lcPath)
OPEN DATA XXD000
USE XXT000 IN 0
USE XXV000 IN 0
USE XXV001 IN 0
loADO=CREATEOBJECT("ADODB.Connection")
loADO.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+lcPath+"xxd000.mdb")
loRS=CREATEOBJECT("ADODB.Recordset")
loRS.ActiveConnection = loADO
loRS.CursorType= 3 && adOpenStatic
loRS.CursorLocation = 3 && adUseClient
loRS.LockType= 3 && adLockOptimistic
** CursorAdapter
loCAx=CREATEOBJECT("cursoradapter")
loCAx.FetchSize=100
loCAx.FetchMemo=.T.
loCAx.CompareMemo=.F.
loCAx.UseMemoSize=255
loCAx.FetchAsNeeded=.F.
loCAx.UpdateNameList=;
"XX000 XXT000.XX000, XX001 XXT000.XX001"
loCAx.UpdatableFieldList=;
"XX000, XX001" && updatování
loCAx.KeyFieldList="XX000" && primární klíè
loCAx.Tables="XXT000" && tabulka
loCAx.WhereType=3
loCAx.BatchUpdateCount=1
loCAx.SendUpdates=.T.
loCAx.UpdateType=1
loCAx.Prepared=.F.
loCAx.CursorSchema=""
loCAx.SelectCmd="SELECT XX000, XX001 FROM XXT000"
loCAx.DataSourceType="ADO"
loCAx.DataSource=loRS
loCAx.Alias="XXV002"
loCAx.MaxRecords=-1
lll=loCAx.CursorFill()
SET CLASSLIB TO ..\proper.vcx
laObj(1)=CREATEOBJECT("_prop_cursor")
laObj(2)=CREATEOBJECT("_prop_cursor")
laObj(3)=CREATEOBJECT("_prop_cursor")
laObj(4)=CREATEOBJECT("_prop_cursor")
laObj(5)=CREATEOBJECT("_prop_cursor")
laObj(1).Set(0)
laObj(2).Set("XXT000")
laObj(3).Set("XXV000")
laObj(4).Set("XXV001")
laObj(5).Set("XXV002")
susp
CLOSE ALL
CLEAR ALL