PDA

View Full Version : "Zero" Managed Connections



Nils G. Svedmyr
23-Feb-2017, 06:12 AM
I would probably not categorize this as a bug but rather a peculiarity;

If one adds the following for Managed Connections in the cApplication object:


Object oConnection is a cConnection
Use LoginEncryption.pkg
Use DatabaseLoginDialog.dg
End_Object

...and then forgets to add connection data to the ini-file.

No message will then be shown and no dialog pops up either. Perhaps this is correct, I'm not sure. However, I can see a problem if the program has been prepared to use Managed connections but then one forgets to deploy the ini-file settings.

Is it designed this way or should it be corrected somehow?

Clive Richmond
23-Feb-2017, 10:47 AM
Hi Nils,


I would probably not categorize this as a bug but rather a peculiarity;

If one adds the following for Managed Connections in the cApplication object:


Object oConnection is a cConnection
Use LoginEncryption.pkg
Use DatabaseLoginDialog.dg
End_Object

...and then forgets to add connection data to the ini-file.

No message will then be shown and no dialog pops up either. Perhaps this is correct, I'm not sure. However, I can see a problem if the program has been prepared to use Managed connections but then one forgets to deploy the ini-file settings.

Is it designed this way or should it be corrected somehow?

If you are using the embedded database, or a SQL database with connection strings i.e. not managed, then there is nothing more to do. This is how the connection class is designed to operate.

On the other if you are using managed connections then you can expect to see an unhandled program error. Similar to the one below. I think the message pretty much points to a configuration issue.:)

10671

Stephen W. Meeley
23-Feb-2017, 10:53 AM
Nils,

As Clive points out, we don't want the simple existence of the code that supports managed connections to trigger an error. That way the application code is always there (for new projects) and ready once you start adding and using connections. If you are using connections and have a missing or bad connection file you'll get the appropriate error.

Nils G. Svedmyr
23-Feb-2017, 12:05 PM
Thanks both. It just so happened that the workspace I was testing with had an empty filelist.cfg so I didn't get the errror message...

Good to know that it works as it should.