I would like to allow the user in a software to enter queries for databases - and the software should connect to various types of database server over time.
Obviously the username will only be allowed to issue SELECT statements and use of databases. That is simple.
But how do I get and process an error from UniDac ? Could be in connection process (unknown user), or in SQL (issues command that is not permitted).
Other thoughts on the subject welcomed (ex: parameters vs SQL sanitizing)
Simple example of how to catch error (user-entered query)
Re: Simple example of how to catch error (user-entered query)
Please see demo projects distributed with UniDAC for an example of how to handle errors :
[UniDAC Demo Folder]\Demos\UniDacDemo\ConnectDialog\MyConnectForm.pas
[UniDAC Demo Folder]\Demos\UniDacDemo\ConnectDialog\MyConnectForm.pas