locked
Connection #0 is busy RRS feed

  • Question

  •  

    When I issue

    sqlsetprop(0,"Transactions",2)

    from within an application, or at the command prompt, I get the following error message:-

    Connection #0 is busy

    In a strange reversal of the usual pattern, this only happens on My machine.  This works fine on all other users machines.

     

    Strangely, if I go to Tools - Options... and select the remote data tab I can use the Automatic Transactions check box to switch between Manual and Automatic transactions with no issues whatsoever...?

     

    I'm running VFP9 SP2.

     

    Can anyone shed light on this?

     

    Thanks in advance,

    Tuesday, April 22, 2008 4:02 PM

Answers

  •  

    Very odd - what happens if you call SQLGETPROP( 0, 'transactions') - does it return the correct value?

     

    These default settings are all stored in the registry in the key:

     

    HKEY_CURRENT_USER\Software\Microsoft\VisualFoxPro\9.0\Options

     

    Could it be a registry issue? A re-install may be the only way to go in that case
    Wednesday, April 23, 2008 10:27 AM

All replies

  • It seems you are running something which keps busy connection prior your statement. You may check:

    http://msdn2.microsoft.com/en-us/library/khtk8tw0(VS.80).aspx 

    Tuesday, April 22, 2008 4:26 PM
  • Thanks for taking a look, but connection 0 isn't a real connection.

    It's a handle for setting the default properties for future connections.

    If I start VFP9 and try and set the Transactions property as the first thing I do, I still get this error.

    Calling sqlgetprop(0,"ConnectBusy") imediately before returns .f.

    I've tried deleting my foxuser.dbf, but I'm really stumpted by this one.

    I think I'll try re-installing VFP9 and see if that solves it...

     

    Thanks,

    Wednesday, April 23, 2008 8:42 AM
  •  

    Very odd - what happens if you call SQLGETPROP( 0, 'transactions') - does it return the correct value?

     

    These default settings are all stored in the registry in the key:

     

    HKEY_CURRENT_USER\Software\Microsoft\VisualFoxPro\9.0\Options

     

    Could it be a registry issue? A re-install may be the only way to go in that case
    Wednesday, April 23, 2008 10:27 AM
  • SQLGETPROP(0,'Transactions') seems to return the current settings fine.

    I can use SQLSETPROP to set the Asynchronous and BatchMode properties without issue.

    It just seems strange that I can change this setting through the options dialogue, but not programatically.

     

    I'll take a look at the registry and post my findings...

     

    Thanks,

    Wednesday, April 23, 2008 12:28 PM
  • I'm running into the same issue, but it's with a compiled app (EXE) rather than the VFP IDE.

    What was the resolution for the original poster's issue?

    Thanks.

    Bill

    Tuesday, October 29, 2013 5:46 PM
  • A client has the same error (Connection #0 is busy.) when executing the statement: SqlSetProp(0,"Transactions",2)

    Anyone knows a solution for it?

    Thursday, January 2, 2014 1:26 PM
  • 1) Try to issue this command for each connection separately

    2) Try to set the default value in Registry

    3) Try to reinstall VFP

    It works fine for me... VFP 9 SP2 7423, W7/64, W/XP

    Thursday, January 2, 2014 3:24 PM
  • Works fine for me as well. Do you get this error even when you run the statement in the new session of VFP?

    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog


    My TechNet articles

    Thursday, January 2, 2014 10:48 PM
  • A client who is running the vfp app from a terminal server got the error while using a specific account,when using another user account the error (Connection 0# is busy) does not occur.
    Friday, January 3, 2014 2:02 PM