Never use SQLDISCONNECT when you have an open transaction. That's a recipe for orphaning your SQL process.
I would suggest a review of the SQL functions in the help. There are connection properties related to transactions and functions for SQLCOMMIT, SQLCANCEL, SQLROLLBACK, etc.
--
rk
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Chris Davis Sent: Tuesday, March 01, 2016 11:55 AM To: profoxtech@leafe.com Subject: RE: SQL Server Transactions
I think I may have found the issue, what happens if I
BEGIN TRANSACTION
Append records via VFP Remote View with Buffering at 5.
And then if TABLEUPDATE is .T.
So a SQL DISCONNECT and don't do a COMMIT?
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Stephen Russell Sent: 01 March 2016 16:52 To: profoxtech@leafe.com Subject: Re: SQL Server Transactions
Do these rows generate a PKey? If so do you need that for secondary table inserts as well?
On Tue, Mar 1, 2016 at 10:50 AM, Chris Davis chrisd@actongate.co.uk wrote:
Thanks for this, but with READ COMMITTED being the SQL Server default, in theory my appended records cannot be seen by other clients until the COMMIT fires?
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Dave Crozier Sent: 01 March 2016 16:47 To: profoxtech@leafe.com Subject: RE: SQL Server Transactions
Chris, Sorry I may have clouded the issue, I just thought VFP tables and not SQL Server DOH!!!.... it has been a long day!
+1 for what Ted has said re Transaction Isolation Level.
Dave
-----Original Message----- From: ProFox [mailto:profox-bounces@leafe.com] On Behalf Of Dave Crozier Sent: 01 March 2016 16:40 To: ProFox Email List profox@leafe.com Subject: RE: SQL Server Transactions
Buffered records actually contain a -ve record number property which exists until the tableupdate/tablerevert.
See towards the bottom of that link.
Dave
-----Original Message----- From: ProFox [mailto:profox-bounces@leafe.com] On Behalf Of Chris Davis Sent: 01 March 2016 16:25 To: profox@leafe.com Subject: SQL Server Transactions
Hi All
If I start a SQL transaction and append records via a VFP View, issue a table update but don't COMMIT the transaction are these records available from another machine? If they are how could I know that they have been appended in a transaction that may well end up getting rolled back?
Thanks
Chris.
Chris Davis Acton Gate Systems Limited
We are moving! Please note our new address from 1st Feb Hilton Hall Business Centre Hilton Lane Essington West Midlands WV11 2BQ M: 07966 020473 *: chrisd@actongate.co.uk Webmailto:chrisd@actongate.co.uk%0bWeb: www.actongate.co.uk< http://www.actongate.co.uk/%3E
This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]