Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Again, troubles with CursorAdapter
Message
From
15/08/2003 15:50:22
 
 
To
15/08/2003 05:48:00
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00819734
Message ID:
00820646
Views:
31
>Hi,
>
>all true, but only if my program is perfect, otherwise it is not sure.
>
>If my program have a bug, i can destroy my clients databases.
>Ok next i stop the job of all my clients ( all to the sea go ),
>debug my application, found the bug .... Absurdity
>

Fabio,

You should play by the rules otherwise sooner or later you are going to be hurt. It doesn't matter whether you know the rules or you don't know them, if you don't follow them you are going to be hurt.

I strongly encourage you to start learning the rules ASAP and have a courage to take a full responsibility for BUGs in your code.

Please, refer to message #820638 for more information.

Thanks,
Aleksey.







>Example:
>
>local lnHandle
>lnHandle=SQLStringConnect('DRIVER=SQL Server;SERVER=??????;Trusted_connection=Yes')
>
>? SQLSETPROP(lnHandle,"Transactions",2)
>
>? SQLEXEC(lnHandle, "USE pubs")
>? SQLEXEC(lnHandle, "CREATE TABLE Test (Tx VARCHAR(20))")
>? SQLEXEC(lnHandle, "INSERT Test (Tx) VALUES  ('scrittura')")
>* simulation of bug, MY PROGRAM EXIT
>QUIT
>? SQLROLLBACK(lnHandle)
>? SQLDISCONNECT(lnHandle)
>
>
>the sequence on MSSQL is:
>
>> mssql commands
>> -- SQLSETPROP(lnHandle,"Transactions",2)
>> set implicit_transactions on
>> -- SQLEXEC(lnHandle, "USE pubs")
>* USE pubs
>> -- SQLEXEC(lnHandle, "CREATE TABLE Test (Tx VARCHAR(20))")
>* CREATE TABLE Test (Tx VARCHAR(20))
>> -- SQLEXEC(lnHandle, "INSERT Test (Tx) VALUES  ('scrittura')")
>* INSERT Test (Tx) VALUES  ('scrittura')
>> --  event QUIT VFP
>* IF @@TRANCOUNT > 0 COMMIT TRAN -- you have a autocommit !!!!!
>
>
>open pubs, Test table exist with a record inserted !
>but my program haven't execute SQLCOMMIT(lnHandle).
>
>FOR use SQLSETPROP(lnHandle,"Transactions",2) on VFP,
>
>VFPT must resolve this BIG BUG.
>
>when a connection with Transactions=2 is open
>and VFP quit,
>
>VFP must send this command
>
>IF @@TRANCOUNT > 0 ROLLBACK
>
>
>Until VFP send IF @@TRANCOUNT > 0 COMMIT TRAN i need to use
>
>SQLEXEC(lnHandle, "BEGIN TRAN")
>
>
>for increment @@TRANCOUNT .
>
>Fabio
Previous
Reply
Map
View

Click here to load this message in the networking platform