Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update 2 or more CA cursors
Message
 
 
To
12/10/2010 11:28:18
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01484765
Message ID:
01484996
Views:
25
Thank you, James. This should get me on the right track. The only issue I will probably see is in the future is if/when I decide to switch from ODBC to OleDb/ADO connection. For this project I use ODBC and obtaining connection to the SQL Server is simple. But I never could figure out how to do it with the OleDb/ADO connection.

Thank you.

P.S. I don't even remember what "memory" is <g>.


>My apologies, my memory is not as good as it used to be. I should have looked it up.
>
>?sqlsetprop(0,"transactions",2)
>
>1 is auto commit.
>If you use 0 as the connection number then all connections will be set that way. Use the connection number if you just want to set that connection.
>
>
>>James,
>>
>>How do you set "autocommit" to .F.? I can't find which class has this property. Please let me know.
>>
>>>If you set autocommints = .f. then you can update both CAs and do a sqlcommint() or sqlrollback() at the end and it will roll everything into a transaction on the remote server side.
>>>
>>>
>>>>>Hi,
>>>>>
>>>>>Is this the right approach to use BEGIN/END TRANSACTION when updating more that one cursor adapter cursors? And if the cursor adapters use SQL Server tables, will the ROLLBACK undo the changes to the SQL Server table(s)?
>>>>>
>>>>>TIA.
>>>>
>>>>IMHO, the best way will be to use a Stored procedure, where you can implement transactions.
>>>>
>>>>I don't think VFP transactions will be of much help here - you can search older messages (about 5 years back), I believe Dorin V was having a similar problem and had discussions with Aleksey T.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform