, Guest>> || || |
/ FoxPro, Visual FoxPro
 vfp8+_+   [new]
sar99
Member

:
: 117
!
!!!
_ -
VFP8 .
VFP8
-

ADO -
CONNECTION RECORDSET ,
ADO.
- :

NAME_CON.BEGINTRANS

< >

NAME_CON.ROLLBACKTRANS

,
!!!

:
-
- !!!

: -
ADO ( )

!!!

! .
11 04, 11:03[873429]      |
 Re: vfp8+_+   [new]
funikovyuri
Member

:
: 4045
profiler - -
11 04, 16:34[875023]      |
 Re: vfp8+_+   [new]
sar99
Member

:
: 117
.
!
, !
< !!!>
-
!!!
12 04, 08:07[875921]      |
 Re: vfp8+_+   [new]
funikovyuri
Member

:
: 4045
+ trace ?
12 04, 09:41[876086]      |
 Re: vfp8+_+   [new]
sar99
Member

:
: 117
* . ( INTERBASE 6)
oc=createobject('adodb.connection')
OP_KR=createobject('adodb.recordset')
Oc.provider="LCPI.IBProvider"
OC.Mode=3
oc.isolationlevel=4096
oc.CursorLocation = 3
OP_KR.CURSORTYPE=3
OP_KR.LOCKTYPE=3
VPUT='\\dsr\d:\database\IMBASE.GDB'
oc.open("data source=&VPUT;ctype=win1251;auto_commit=true;auto_commit_level=0x100000;","&vlogin","&vpar")
--------------------------------------------------------------------------
* LOAD ,

LOCURSOR=CREATEOBJECT('CURSORADAPTER')
select 0
WITH LOCURSOR
.ALIAS = 'proba'
.DATASOURCETYPE = 'ADO'
.DATASOURCE = OP_KR
.SELECTCMD = 'Select * from proba order by f_key'
.DATASOURCE.ACTIVECONNECTION = OC
.KeyFieldList='f_key'
.UpdatableFieldList='f_key,f2,f3'
.UpdateNameList='f_key proba.f_key,f2 proba.f2,f3 proba.f3'
IF .CURSORFILL()
select ('proba')
GO TOP
ELSE
WAIT WINDOW ' !!!' TIMEOUT 4
quit
ENDIF
ENDWITH
----------------------------------------------------------------------
* (
vnam vtu )
oc.begintrans
***
COM_KR.COMMANDTEXT="SELECT GEN_ID(PROBA_GEN,1) FROM RDB$DATABASE"
COM_KR.activeconnection=oc
F_GEN=COM_KR.execute()
VNNM=F_GEN.FIELDS('GEN_ID').VALUE
***
INSERT INTO PROBA (f_key,F2,F3) VALUES (vnnm,vnam,vtu)
oc.rollbacktrans
*** - !!!
12 04, 12:01[876664]      |
 Re: vfp8+_+   [new]
funikovyuri
Member

:
: 4045
trace IB ?

- auto_commit - Provider' IB ?
12 04, 14:26[877392]      |
 Re: vfp8+_+   [new]
funikovyuri
Member

:
: 4045
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcauto_commit_mode.asp

if an error occurs in the middle of the batch, it is data sourcespecific whether the already-executed statements are committed or rolled back. Thus, interoperable applications that use batches and require them to be committed or rolled back as a whole should execute batches only in manual-commit mode.
12 04, 14:45[877483]      |
 Re: vfp8+_+   [new]
sar99
Member

:
: 117
! - - !!!
,
.
, -

.
12 04, 16:52[878108]      |
 Re: vfp8+_+   [new]
sar99
Member

:
: 117
!
AUTU_COMMIT -
!!
INSERT INTO
:
INDSERT INTO
( UPDATE !!!)
INSERT INTO
TABLEUPDATE()
,
!!! ( AUTO COMMIT !!!)

AUTO COMMIT ,
INSERT INTO
SELECT ('PROBA')
INSERT INTO
=TABLEUPDATE()

!!!

-
!
13 04, 08:11[879027]      |
/ FoxPro, Visual FoxPro