Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Updating a remote data source
Message
From
03/03/1999 11:52:06
 
 
To
03/03/1999 11:28:53
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00193279
Message ID:
00193646
Views:
15
Hi Todd ---

AFAIK, all remote view transactions are handled remotely by the server database; BEGIN..END TRANSACTION at the VFP level are ignored.

>
>What you, John Koziol and Bob Archer say makes ALOT of sense. I'll have a shot at rebuilding things to use shared connections. I really thank you folks for helping me out. I hate it when I go into thrash mode just before a project is due. I have the feeling that the shared connection is the little bit of something that I was missing.
>
>Correct me if I am wrong, but using BEGIN/END TRANS in this case is worthless? Since I am ONLY updating the remote data thru remote views, they have no effect at all, and the only commands that will have an effect are sqlcommit and sqlrollback.
>
>>>I am updating a remote data source via remote views. I have a data base of updates that I want to apply to the remote data base.
>
>>I have a suspicion that if you checked the number of connections you have, you would find more than one. Although you set the transaction property to MANUAL for nhandle, you have not defined your views to share connections. By default, they do not. This means that as each view is opened, it uses its own handle. Since this is the case, the transaction mode for this new handle, by default, is also automatic, so your data will be committed. Before opening the cursor, you should set the shareconnection property to .T.
>>
>>Also, nhandle is not the connection handle used by ANY of your views. This is a separate handle. I don't now of any way to open a connection and then force views to use it. The first time a view is opened with the DBC connection tovistar it will open a connection and if all views using tovistar say to share connections, this is the only one opened. Although you have nhandle, I don't know how you can get it to be used by the views. Also, when the last view is closed, I believe the connection handle is also closed.
>>
>>I have found a general need to have two connection handles always open, one for SQL passthrough and one for views. Of course, when I run transactions that update views and SQL passthrough (such as doing an @@IDENTITY call) I set the passthrough handle to the handle of one of the views opened.
>>
>>When doing manual transactions, it is very important to set shareconnections otherwise you could end up blocking yourself.
>>
>>Hope this helps! Other comments would be appreciated.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Reply
Map
View

Click here to load this message in the networking platform