I'm trying to connect to database by ODBC Setup Firebird ODBC setup
<?php
$user = "SYSDBA";
$password = "masterkey";
$dsn= "DRIVER={Devart ODBC Driver for Firebird};Database=bazatestowa;Server=localhost;Port=3050";
$con=odbc_connect($dsn,$user,$password);
if($con){
echo "Connected";
}else{
echo "Failed"; }
?>
This is error I get:
Warning: odbc_connect(): SQL error: [Microsoft][driver manager ODBC] Could not find data source name and no default driver specified , SQL state IM002 in SQLConnect in C:\Integracja-skrypty\index.php on line 5
I have no idea what to input in $dsn to make it work.
I translated the error message.
<?php
$user = "SYSDBA";
$password = "masterkey";
$dsn= "DRIVER={bazatestowa}";
$con=odbc_connect($dsn,$user,$password);
if($con){
echo "Connected";
}else{
echo "Failed";
}
?>
With this code the error is the same.
<?php
$user = "SYSDBA";
$password = "masterkey";
$dsn= "bazatestowa";
$con=odbc_connect($dsn,$user,$password);
if($con){
echo "Connected"; }else{ echo "Failed"; }
?>
With this code I have this error
PHP Warning: odbc_connect (): SQL error: [Microsoft] [ODBC driver manager] Given DSN contains architecture mismatch between driver and application, SQL state IM014 in SQLConnect in C: \ Integration-scripts \ index.php on line 5