Parameters
$dbServer - The DB Server name.
$dbName - The Database name.
$userID - The user name.
$password - The user Password.
Syntax
| PHP |
public function SetConnectionValues(string $dbServer, string $dbName , string $userID, string $password)
|
Sets the $ConnectionValues property.
Example
| PHP |
// Resets the $ConnectionValues property.
private static function SetConnectionValues(
LJCConnectionValues $connectionValues)
{
// See constructor for how to create $connectionValues.
$dbAccess = new LJCDbAccess($connectionValues);
$dbServer = "localhost";
$dbName = "DatabaseName";
$userID = "UserID";
$password = "Password";
$dbAccess->SetConnectionValues($dbServer, $dbName, $userID, $password);
$values = $dbAccess->ConnectionValues;
if (null == $values
|| $values->DbServer != "localhost"
|| $values->DbName != "DatabaseName"
|| $values->UserID != "UserID"
|| $values->Password != "Password")
{
echo("\r\nSetConnectionValues() Connection values not set correctly.");
}
}
|
Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.