SimplySDK.SDKInstanceManager.Instance.OpenDatabase just returns false -- all the time

Hi,

I am using the SDK as follows:

        ret = SimplySDK.SDKInstanceManager.Instance.OpenDatabase(mydbpath, <username>, <password>, True, <myappname>, <shortappname>, 1)

I have used this line in many programs before to open up the database, however, in my latest program it always returns 0. I am POSITIVE the filename, username and password are correct (I copied and pasted these lines from another program that works!).

I am wondering if there are any log files this call generates where I can find out what is going wrong? It does not generate any errors, just returns 0 all the time.

Could this call fail due to other settings (ie. .Net Frameworks, x86 settings, etc?). How would I find out WHAT is making it return 0?

I have the target Framework set to 3.5 (worked for all my previous apps) and target CPU to x86 (also worked for previous apps). I am also using the SAME versions of SimplySDK as the other programs, on the SAME database file version.

 

Thanks,

 

Erwin

  • Further to the description above, I am finding the following entry in the errorText.log file inside the .SAJ file everything I try to execute OpenDatabase:

     

    Error in my_thread_global_end(): 2 threads didn't exit

     

    Erwin

  •  

    Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman","serif";}

    I had “Make Single Instance Application” selected in my project and that somehow influenced the Simply SDK. As soon as I unchecked that option it opens the database without problems.

    Erwin

  • Yes, in 2010 it's under Project Properties -> "Application" tab,  under "Windows Application Framework Properties"

     

    Erwin

  • Have you found a solution for this? I cannot get this to work. OpenDatabase always returns false but it does not tell you why. Is there a simple way to debug this? I'm using C#
  • in reply to VivienAlcide

    The sample file compiles as a command prompt application, if you add

    Console.WriteLine("Press Enter to close");

    Console.ReadLine();

    Or open a command prompt and run the sample file from the bin\debug folder .

    I think that any errors go to stdout, which might be nowhere if it's not run from a command prompt.

  • in reply to RandyW
    Hello,
    I'm having the same issue.
    Were you able to resolve it?

    Regards

    Nicolas Asselin
  • in reply to egerrits

    egerrits said:
    I had “Make Single Instance Application” selected in my project and that somehow influenced the Simply SDK. As soon as I unchecked that option it opens the database without problems.

    The original poster's solution. ^

  • in reply to RandyW
    Alright
    Thank you for your quick awnser but it doesn't seems to work for us.
  • in reply to NAsselin
    Hello,

    I found my problem.
    We had a capital letter configure in our username. In the SAGE 50 program it doesn’t matter if you type lowercase or uppercase, but trough the SDK it does matter.
    So if I was typing a completely wrong username I was receiving an error, but the proper username all lowercase instead of the first letter in uppercase, I was not receiving an error.