1. Sabir Foux
  2. SnapObjects
  3. Monday, 9 September 2019 06:44 AM UTC

This may be more of a question I can post on the dotnet forums but I wanted to asked for the expert opinion from the Appeon community first.

Lets say I create a web api from my data windows using the C# generator. I want to have a database for each tenant/client. I need to be able to call the right database based on a value passed to the web api (could be a key, id, connString, etc). How would I dynamically select the right database based on that value using, for example, an ODBC connection to a SQL Anywhere database?

 

Our need: We need to be able to call the web api with the data + the ID for the intended database at runtime.

Question: How would we dynamically select the right database at runtime?

Accepted Answer
Sabir Foux Accepted Answer Pending Moderation
  1. Tuesday, 10 September 2019 05:11 AM UTC
  2. SnapObjects
  3. # Permalink

I found the FactoryDemo example from another post and I've been going through that to see how I can use it in my project. It may have the answers for me.

Comment
  1. CRISTIAN MEDINA
  2. Tuesday, 10 September 2019 23:05 PM UTC
Hello please have you the link to that post or the link to download FactoryDemo example

Thanks
  1. Helpful
  1. Sabir Foux
  2. Tuesday, 10 September 2019 23:48 PM UTC
Here is the post with the Factory Demo example. I was able to find this link after all.

https://community.appeon.com/index.php/qna/q-a/dynamic-connections-with-snapobjects
  1. Helpful
There are no comments made yet.
Sabir Foux Accepted Answer Pending Moderation
  1. Tuesday, 10 September 2019 23:46 PM UTC
  2. SnapObjects
  3. # 1

Hello Luis,

I can't find the exact post. I know I saved the bookmark somewhere but it would be easier to just give you the file. If you have the same challenge perhaps you can study the code and figure out how to use it for your project. 

Good luck!

Attachments (1)
Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.