Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Again, troubles with CursorAdapter
Message
De
16/08/2003 09:27:14
 
 
À
16/08/2003 05:06:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00819734
Message ID:
00820743
Vues:
54
Hi Aleksey,

i have debug ODBC commands send by VFP8.

You have reason for these:
IF @@TRANCOUNT > 0 COMMIT TRAN
is generated by ODBC driver.
 SQLSETPROP(lnHandle,"Transactions",1)
 exec a implicit Commit, and it return a warning 
I can disable this behaviour? I hope yes for ODBC for SQL Server.

But, like confirm by you to Bob, for SQLDISCONNECT, is VFP to send
a SQLTransact() to ODBC Driver.

I report ODBC Tracking after any correlate VFP Command:
lnHandle=SQLStringConnect('DRIVER=SQL Server;SERVER=FABIO-EVO\FABIO;Trusted_connection=Yes')

*!*  ...........
*!*	vfp8            e4-be0	ENTER SQLSetStmtOption 
*!*			HSTMT               030C1BE8
*!*			UWORD                        4 <SQL_ASYNC_ENABLE>
*!*			SQLPOINTER          0x00000000

*!*	vfp8            e4-be0	EXIT  SQLSetStmtOption  with return code 0 (SQL_SUCCESS)
*!*			HSTMT               030C1BE8
*!*			UWORD                        4 <SQL_ASYNC_ENABLE>
*!*			SQLPOINTER          0x00000000

=SQLSETPROP(lnHandle,"Transactions",2)

*!*	vfp8            e4-be0	ENTER SQLSetConnectOption 
*!*			HDBC                030C15E8
*!*			SQLINTEGER                 102 <SQL_AUTOCOMMIT>
*!*			SQLPOINTER          0x00000000

*!*	vfp8            e4-be0	EXIT  SQLSetConnectOption  with return code 0 (SQL_SUCCESS)
*!*			HDBC                030C15E8
*!*			SQLINTEGER                 102 <SQL_AUTOCOMMIT>
*!*			SQLPOINTER          0x00000000

=SQLEXEC(lnHandle,"")

*!*	vfp8            e4-be0	ENTER SQLExecDirect 
*!*			HSTMT               030C1BE8
*!*			UCHAR *             0x0108EA98 [      -3] "\ 0"
*!*			SDWORD                    -3

*!*	vfp8            e4-be0	EXIT  SQLExecDirect  with return code 0 (SQL_SUCCESS)
*!*			HSTMT               030C1BE8
*!*			UCHAR *             0x0108EA98 [      -3] "\ 0"
*!*			SDWORD                    -3

*!*	vfp8            e4-be0	ENTER SQLNumResultCols 
*!*			HSTMT               030C1BE8
*!*			SWORD *             0x0012F8D0

*!*	vfp8            e4-be0	EXIT  SQLNumResultCols  with return code 0 (SQL_SUCCESS)
*!*			HSTMT               030C1BE8
*!*			SWORD *             0x0012F8D0 (0)

*!*	vfp8            e4-be0	ENTER SQLMoreResults 
*!*			HSTMT               030C1BE8

*!*	vfp8            e4-be0	EXIT  SQLMoreResults  with return code 100 (SQL_NO_DATA_FOUND)
*!*			HSTMT               030C1BE8

*!*	vfp8            e4-be0	ENTER SQLFreeStmt 
*!*			HSTMT               030C1BE8
*!*			UWORD                        0 <SQL_CLOSE>

*!*	vfp8            e4-be0	EXIT  SQLFreeStmt  with return code 0 (SQL_SUCCESS)
*!*			HSTMT               030C1BE8
*!*			UWORD                        0 <SQL_CLOSE>

*!*	vfp8            e4-be0	ENTER SQLFreeStmt 
*!*			HSTMT               030C1BE8
*!*			UWORD                        3 <SQL_RESET_PARAMS>

*!*	vfp8            e4-be0	EXIT  SQLFreeStmt  with return code 0 (SQL_SUCCESS)
*!*			HSTMT               030C1BE8
*!*			UWORD                        3 <SQL_RESET_PARAMS>

=SQLDISCONNECT(lnHandle)

*!*	vfp8            e4-be0	ENTER SQLCancel 
*!*			HSTMT               030C1BE8

*!*	vfp8            e4-be0	EXIT  SQLCancel  with return code 0 (SQL_SUCCESS)
*!*			HSTMT               030C1BE8

*!*	vfp8            e4-be0	ENTER SQLFreeStmt 
*!*			HSTMT               030C1BE8
*!*			UWORD                        1 <SQL_DROP>

*!*	vfp8            e4-be0	EXIT  SQLFreeStmt  with return code 0 (SQL_SUCCESS)
*!*			HSTMT               030C1BE8
*!*			UWORD                        1 <SQL_DROP>

*!****************************************
*!*  NOW VFP commit the changes !!!!
*!****************************************

*!*	vfp8            e4-be0	ENTER SQLTransact 
*!*			HENV                030C1540
*!*			HDBC                030C15E8
*!*			UWORD                        0 <SQL_COMMIT>

*!*	vfp8            e4-be0	EXIT  SQLTransact  with return code 0 (SQL_SUCCESS)
*!*			HENV                030C1540
*!*			HDBC                030C15E8
*!*			UWORD                        0 <SQL_COMMIT>

*!*	vfp8            e4-be0	ENTER SQLDisconnect 
*!*			HDBC                030C15E8

*!*	vfp8            e4-be0	EXIT  SQLDisconnect  with return code 0 (SQL_SUCCESS)
*!*			HDBC                030C15E8

*!*	vfp8            e4-be0	ENTER SQLFreeConnect 
*!*			HDBC                030C15E8

*!*	vfp8            e4-be0	EXIT  SQLFreeConnect  with return code 0 (SQL_SUCCESS)
*!*			HDBC                030C15E8
I had put my attention on IF @@TRANCOUNT > 0 COMMIT TRAN why he is what he is looked at on SQL Profiler,
but SQL Profiler is not the program adapted in order to debug the ODBC.

Now i'm calmer, the ODBC does not have bug on the detailed lists.

I hope VFPT analyze this problem and it takes one heart, but right decision, to remove SQLTransact sended from SQLDISCONNECT.

Thanks
Fabio
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform