Picture of Bernd 5977
Registered 3 years 66 days
Bernd 5977 Friday, 4 February 2022, 04:51 PM
Creating a database from external possible ?
Hello together

Is it possible to create a database in postgreSQL from external with a sql script or maybe with a gui client and afterwards reading the data from an App?

Or is it only possible to create the database inside an App?

I had a view the c++ counter example template in Visual Studio.

I also tried to connect to the database with a database viewer but without success.
What are connection parameters?
Port: 5432?
SSL?

Do somebody has experiences about?
And some suggestions?

Best regards
Bernd
Picture of Daniel Deterding (innovaphone)
Moderator Registered 15 years 121 days
Daniel Deterding (innovaphone) Monday, 7 February 2022, 06:52 AM
Re: Creating a database from external possible ?
Hi Bernd,

this is explained here:
http://wiki.innovaphone.com/index.php?title=Reference13r2:Concept_App_Platform#Database

In short: there is no external access possible without manual modification of the postgresql configuration.

Greetings,
Daniel
Picture of Bernd 5977
Registered 3 years 66 days
Bernd 5977 Monday, 7 February 2022, 10:52 AM
Re: Creating a database from external possible ?
Hi Daniel,

thank you very much for your reply.

I thought I can use a database to save customer specific information for an app.
I had the idea to have a possiblity to create initially a database for all app user of a customer and intialize with some data that the apps can read.

What's about a config file to save customer specific information for an app?
Is it possible to read a property file from an app?
If yes, where I have to locate this file?
Or are there another possiblites to create customer based configuration that apps can read?

Best regards
Bernd
Picture of Daniel Deterding (innovaphone)
Moderator Registered 15 years 121 days
Daniel Deterding (innovaphone) Monday, 7 February 2022, 11:14 AM
Re: Creating a database from external possible ?
Hi Bernd,

the idea here is to use a specific config table inside the existing database to store customer related configuration options:

https://sdk.innovaphone.com/13r2/sdk/common/lib/config.htm

The configuration itself should be done by a PBX Manager Plugin.
The sample application already contains such a plugin which uses the config library.

Greetings,
Daniel
Picture of Bernd 5977
Registered 3 years 66 days
Bernd 5977 Monday, 7 February 2022, 12:41 PM
Re: Creating a database from external possible ?
Hi Daniel

it sounds that this exactly what I'm looking for smile

What sample application do you mean?
The one which I can create with Visual Studio based on the "innovaphone App" in C++? That would be the way I would like to prefer.

Best regards
Bernd
Picture of Daniel Deterding (innovaphone)
Moderator Registered 15 years 121 days
Daniel Deterding (innovaphone) Monday, 7 February 2022, 12:46 PM
Re: Creating a database from external possible ?
Yes, this one smile
Picture of Bernd 5977
Registered 3 years 66 days
Bernd 5977 Monday, 7 February 2022, 01:28 PM
Re: Creating a database from external possible ?
Hi Daniel,

sorry for my "stupid" questions but I'm new on App development...

Ok, when you start this example you can increment a counter and this update will be written to the database and with the admin page you can reset the counter.

What I don't get is in this example, where is the part where I can define the Config?
Is this the "page" in the AP Manager where I can define the instance parameter of the app like Name, Domain, ..., Database name, Database user and Database password?
How do I define which parameters are editable?

If this is the correct place, a nice example would be, if I could define in this page
a "start value" of that counter, which will be used as an intial value or
when I reset the counter by the admin.

But could that look like in the c++ code?

Best regards
Bernd
Andreas Fink
Moderator Registered 13 years 52 days
Andreas Fink (innovaphone) Monday, 7 February 2022, 03:41 PM
Re: Creating a database from external possible ?
Hello Bernd,

I'm not sure about use case, but probably a PBX Manager Plugin of an app is the place, where you could implement some specific App Instance configuration:

https://sdk.innovaphone.com/13r2/web1/com.innovaphone.manager/pbx_manager_plugin.htm

If a sample C++ app is created in the VS, you can navigate in the folder structure of your project to <appname>/apps/<manufacturer><appname>manager.js , where the UI implementation of the PBX Manager Plugin is done.

I hope this helps. If not and use case is different, please explain it more detailed.

Best Regards
Andreas Fink


Picture of Bernd 5977
Registered 3 years 66 days
Bernd 5977 Thursday, 24 February 2022, 11:54 AM
Re: Creating a database from external possible ?
Hello Andreas,

I have solved my problem meanwhile.
Thank you for your support.

Best regards
Bernd
← You can define your color theme preference here