Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Dexter Carlit
  Where is Dexter Carlit?
 Cabanatuan
 Philippines
 Dexter Carlit
 To: Nilson Rishi
  Where is Nilson Rishi?
 Bangkok
 Thailand
 Nilson Rishi
 Tags
Subject: RE: how to lock a table,row in SQL server from VFP
Thread ID: 104068 Message ID: 104126 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Databases, Tables and SQL Server
Date: Friday, August 11, 2006 5:52:49 PM         
   


> > Just a little correction.... :-) it would only be locked forever if you didn't release or end that session on the SQL Server side.
> >
> > In SQL there's a standard way where you can display all connections and terminate if there's a records that was being locked.
> >
> > * Display all connections
> > sp_who2
> >
> > * Kill Certain Process
> > Kill [SPID]
>
> Do you mean a user could kill another user's connection from within VFP, or it must be done from SQL Server side?

----- You should do it from SQL Server Side.

> Imagine this: immediately after I logged the keyfield, username, datetime into the lock table,someone unplugs my LAN connection(another question: my connection is still there with the SQL Server with a SPID?),I could not delete the record from the lock table, making other users think I am still editing the target data and they could not do any edits. But in fact, I have lost physical connection to the SQL Server and thus is not making any edits.
> Even if my SPID is still there within SQL Server after my LAN got unplugged, how could other users know I lost LAN? Such an sudden case as an unplugged LAN makes any attempt to use a on_LAN flag fail sometimes,too.

----- If you were using Stored Procedures and there such case that you've been unplugged from the network while in middle of saving some data your Stored Procedure should have Rollback Transactions to return the record from its previous and original state.

> Regards,
> Nilson


ENTIRE THREAD

how to lock a table,row in SQL server from VFP Posted by Nilson Rishi @ 8/11/2006 3:20:15 AM
RE: how to lock a table,row in SQL server from VFP Posted by Ken Murphy @ 8/11/2006 4:47:44 AM
RE: how to lock a table,row in SQL server from VFP Posted by Nilson Rishi @ 8/11/2006 5:07:11 AM
RE: how to lock a table,row in SQL server from VFP Posted by Andy Kramek @ 8/11/2006 11:39:06 AM
RE: how to lock a table,row in SQL server from VFP Posted by Nilson Rishi @ 8/11/2006 4:31:02 PM
RE: how to lock a table,row in SQL server from VFP Posted by Andy Kramek @ 8/11/2006 7:42:52 PM
RE: how to lock a table,row in SQL server from VFP Posted by Nilson Rishi @ 8/12/2006 5:21:05 AM
RE: how to lock a table,row in SQL server from VFP Posted by Andy Kramek @ 8/12/2006 1:38:26 PM
RE: how to lock a table,row in SQL server from VFP Posted by Nilson Rishi @ 8/12/2006 5:39:49 PM
RE: how to lock a table,row in SQL server from VFP Posted by Andy Kramek @ 8/12/2006 9:55:28 PM
RE: how to lock a table,row in SQL server from VFP Posted by Nilson Rishi @ 8/13/2006 5:14:59 AM
RE: how to lock a table,row in SQL server from VFP Posted by Nilson Rishi @ 8/11/2006 4:47:07 PM
RE: how to lock a table,row in SQL server from VFP Posted by Martin Sellwood @ 8/11/2006 11:55:11 AM
RE: how to lock a table,row in SQL server from VFP Posted by Dexter Carlit @ 8/11/2006 2:22:22 PM
RE: how to lock a table,row in SQL server from VFP Posted by tushar @ 8/11/2006 2:37:23 PM
RE: how to lock a table,row in SQL server from VFP Posted by Dexter Carlit @ 8/11/2006 3:55:07 PM
RE: how to lock a table,row in SQL server from VFP Posted by Nilson Rishi @ 8/11/2006 5:15:22 PM
RE: how to lock a table,row in SQL server from VFP Posted by Dexter Carlit @ 8/11/2006 5:52:49 PM
RE: how to lock a table,row in SQL server from VFP Posted by Nilson Rishi @ 8/11/2006 6:15:35 PM
RE: how to lock a table,row in SQL server from VFP Posted by Dexter Carlit @ 8/11/2006 8:09:02 PM
RE: how to lock a table,row in SQL server from VFP Posted by Nilson Rishi @ 8/12/2006 5:31:24 AM
RE: how to lock a table,row in SQL server from VFP Posted by Dexter Carlit @ 8/12/2006 9:28:20 AM
RE: how to lock a table,row in SQL server from VFP Posted by Nilson Rishi @ 8/12/2006 5:44:43 PM
RE: how to lock a table,row in SQL server from VFP Posted by Nilson Rishi @ 8/11/2006 4:44:27 PM
RE: how to lock a table,row in SQL server from VFP Posted by Dexter Carlit @ 8/11/2006 4:52:50 PM
RE: how to lock a table,row in SQL server from VFP Posted by Martin Sellwood @ 8/11/2006 5:04:19 PM
RE: how to lock a table,row in SQL server from VFP Posted by Dexter Carlit @ 8/11/2006 5:18:03 PM
RE: how to lock a table,row in SQL server from VFP Posted by Nilson Rishi @ 8/11/2006 5:47:53 PM
RE: how to lock a table,row in SQL server from VFP Posted by Nilson Rishi @ 8/11/2006 5:41:32 PM