Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQLCONNECT: DB object being used by someone else

Status
Not open for further replies.

Headwinds

Programmer
Joined
Feb 6, 2001
Messages
38
Location
US
We have a VFP6 application using SQL Server 7 as the back end. We just rewrote the whole thing (96 forms, 60 reports) to use SQL passthrough commands instead of SQL remote views. Everything's working, but about once or twice a day, a user gets the "Database object is being used by someone else" error message. The code that is trying to execute when this happens is:

Code:
  m.handle = SQLCONNECT("our_conn")

What could be causing this? FoxPro would normally display this error message (#1709) if the application tried to access a table, view, or other database object that was locked for modification by a developer, but the application doesn't modify the structure of any database objects.

"our_conn" is a named connection, defined in the FoxPro database container using a connection string--not a DSN.

Our SQL passthrough code gets a connection instance when we're ready to execute it and drops the connection instance immediately after execution. The only exceptions are a couple of points at which we're reserving the ability to rollback a bad transaction. None of these transactions last more than a second or two.

Client workstations are using Windows 2000, and the server has Windows NT 4. We have the latest service packs.

TIA for anything you can suggest.
 
Since your connection is defined in the DBC and it locks records when used, you can have problems - I've seen it when accessing remote views. You may need to create a local copy of the DBC - see for a discussion on this problem and various solutions.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top