Hey,
Perhaps you should give more information.
What does not work ? does it not connect ? does it give a error ?
How are you using it ?
Got a sample of your code ?
Hate me or Love me, Just dont bother me!
Only argument i lose, is a argument with my gf, where even when i am right i lose
we just need the codes for mssql+odbc_connect with pdo and odbc_exe to see the data
$cnx = new PDO("odbc:Driver={EFR};Server=localhost;Port:7004;Database=EFR", 'LcLfVJFLTKTCEHRO', '*'); –
new PDO('odbc:Driver={SQL Server Native Client 10};Server='.SQL_HOST.';Database='.SQL_WEB_DB.'', SQL_USER, SQL_PASSWORD)
Are the correct PHP extensions enabled to allow this ?
define("Username", 'sa');
define("Passowrd", 'dbpassword');
define("DSN", 'odbc:Driver={SQL Server};server=SERVERNAME\SQLEXPRESS');
try {
$mssql = new PDO("odbc:Driver={SQL Server};server=SERVERNAME\SQLEXPRESS;DATABASE=account_dbf", Username, Passowrd);
}
catch(PDOException $exception){
echo "Connection error: " . $exception->getMessage();
}
$query = "SELECT account, FROM ACCOUNT_DBF.dbo.ACCOUNT_TBL";
$stmt = $mssql->prepare($query);
$stmt->execute();
it is fixed now thanks for you help
we have to figure it out now theses are the codes php.pdo
define("Username", 'sa');
define("Passowrd", 'dbpassword');
define("DSN", 'odbc:Driver={SQL Server};server=SERVERNAME\SQLEXPRESS');
try {
$mssql = new PDO("odbc:Driver={SQL Server};server=SERVERNAME\SQLEXPRESS;DATABASE=account_dbf", Username, Passowrd);
}
catch(PDOException $exception){
echo "Connection error: " . $exception->getMessage();
}
$query = "SELECT account, FROM ACCOUNT_DBF.dbo.ACCOUNT_TBL";
$stmt = $mssql->prepare($query);
$stmt->execute();