This topic is locked

Connection Using The PHPRunner Driver

4/5/2021 9:18:28 PM
PHPRunner General questions
milver author

Good night, is it possible to use the same connection driver that PHPRunner uses to make a connection to a database using a custom button? If so, could anyone post an example? something like this

define('DB_HOST' , "localhost");
define('DB_USER' , "sa");
define('DB_PASSWORD' , "xxxxx");
define('DB_NAME' , "xxxxx");
define('DB_DRIVER' , "sqlsrv");

require_once "Connection.php";

try{
$Connection = Connection::getConnection();
}catch(Exception $e){

echo $e->getMessage();
exit;

}
admin 4/7/2021

Could you explain the whole situation? Normally you do not need to connect manually and you can simply use
Database API

milver author 4/8/2021

I need to save connection data from multiple databases. Example:

  • Type |dbase | user | password

  1. mssql | A | admin | xxxxx
  2. oracle | B | admin | xxxxx
  3. mysql | C | admin | xxxxx

so i need a button that validates the connection before saving to validate the data before saving

J
Johann.datacare@gmail.com 6/8/2021

Did you solve your problem?

I am also developing a multiple DB project. One database local and the other in the cloud. Sometimes there will not be an internet connection.
I would also like to test the DB connection to the cloud DB before I connect to it, Or intercept the error message. I would like to give the user a message "Not connected" in stead off an error message.

milver author 7/12/2021

I did not make it