tedb19
Posts: 1
Joined: Sun Mar 18, 2018 5:11 am

Predefined Connection Issues:

Sun Mar 18, 2018 5:18 am

Hi guys,

How can I pick the user-specified database credentials (username, password, port etc) from the predefined connection and use them to run the app? As it is, the user can enter these details, but I am unable to get access to them so that I can use them in my app. The most ideal would be to create them as environment variables?

Also, under predefined connection, checking the "create database if it does not exist" option doesn't seem to work, since it throws an error whenever the database is missing.

Pls help.

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Predefined Connection Issues:

Wed Mar 21, 2018 12:14 pm

Hello and welcome to our forums,

To achieve what you want you can use the properties (e.g. SERVER_PROP, DATABASE_PROP, USERNAME_PROP, PASSWORD_PROP, etc) associated with the edit box controls from the SQL dialog where the user enters the SQL connection parameters. You can use formatted references of those properties on both project views:

1. on "SQL Databases" view to configure the connection string
2. on "Environment" view to configure the value of the environment variables you want to create at install time

Also, under predefined connection, checking the "create database if it does not exist" option doesn't seem to work, since it throws an error whenever the database is missing.
I'm not so sure why this happens. Can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them?

If you cannot share with us your project file, then you can try to isolate the behavior in a buildable sample (.aip + its referenced files) which we can build and test on our side.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”