abhishekk5
abhishekk5

Reputation: 43

how to create a multiple connection with advantage database server at same time?

I am trying to integrate alongside an existing application that uses ADS as its database.

When i connect my integration app using the code below it connects fine until i try and run the original application at the same time. It seems to only allow one connection, my application seems to hold the connection and block all others. Yet i can have multiple instances of the original application running conncurrently with no issue. Which leads me to believe that its the way in which i am trying to correct from my c# app. The error im getting when the original app is open and i then try to connect with my integration app is "The Advantage Data Dictionary cannot be opened. axServerConnect" .

Error 7077: The Advantage Data Dictionary cannot be opened. axServerConnect

Anyone any suggestions? How to create a multiple connection at same time?

Python code:

conn = adsdb.connect(DataSource=str(dbpath[0]), ServerType='local', 
UserID = config.ADS_USERNAME, password=config.ADS_PASS)

Upvotes: 1

Views: 491

Answers (1)

nima
nima

Reputation: 1645

According to this page in ADS documentations, you can use connection pooling by providing pooling=True to your client connection arguments.

I think using this approach, you will be able to open multiple connections at the same time.

Edit

After checking adsdb python script, I think it does not support connection pooling. You probably be able to set that connection pooling in your C# application.

Upvotes: 1

Related Questions