Connecting to external server takes very long

SOLVED

Hello,

I've created an application for Sage 50 using the SDK and I'm having a bit of an issue connecting to our company on a server. If I start a Peachtree session with a local company I created on my machine it works great but when I start a session with our company on the server it takes almost 10 minutes for the initial connection to complete. The same issue occurs when I use the sample code provided by the SDK to connect to our server. Is it normal for a Peachtree session to take this long to start?

Thanks,

Chris

Parents
  • 0

    I started trying to fix this again. This time I used LookupCompanyIdentifier in PeachtreeSession instead CompanyList. LookupCompanyIdentifier works on a test company on my machine but does not work when trying to connect to the company on our server. 

    I get an ArgumentException thrown saying that the database was not found which left me confused. This makes me think the database name is different from the company name but I'm not sure how to get to the database name. 

    Anyone else use LookupCompanyIdentifier with this issue occurring?   

  • +1 in reply to Chris Krozel
    verified answer

    I wanted to mention that I did solve this issue after I found out that a CompanyIdentifier has a DatabaseName in it. I was not able to find the database name another way so not sure if there is an easier way.

    But if anyone else is having an issue with a slow connection to their database and you don't know the database name, my solution was to use the CompanyList call as explained above then output the database names to console. Once I figured out the database name I was able to use LookupCompanyIdentifier which decreased connection time significantly. 

Reply
  • +1 in reply to Chris Krozel
    verified answer

    I wanted to mention that I did solve this issue after I found out that a CompanyIdentifier has a DatabaseName in it. I was not able to find the database name another way so not sure if there is an easier way.

    But if anyone else is having an issue with a slow connection to their database and you don't know the database name, my solution was to use the CompanyList call as explained above then output the database names to console. Once I figured out the database name I was able to use LookupCompanyIdentifier which decreased connection time significantly. 

Children
No Data