Hi people 🆒 ,
I have been searching in all forums here and found something which looked quite like my problems...the answers though, didn't help me.
I have some expierience with php an mysql (see http://www.dozentenpool24.de, my first professional job. Now I've got to program something that should connect through ODBC to the Access Database we have in the office. It is situated in the network in a harddisk with the name R:\ I've tried the following:
class Datenbank{
var $verbindung;
var $server = "\Server2000-01\alejandro.frasch\Schulverwaltung"; // Serveradresse
var $dsn = "\Server2000-01\alejandro.frasch\Schulverwaltung\Schulver.dsn"; // ODBC DSN
var $database = "\Server2000-01\alejandro.frasch\Schulverwaltung\schulverwaltung.mdb"; // Datenbank
var $uid = ""; // Username
var $pwd = ""; // Password
function Datenbank(){
if(!$this->verbindung = odbc_connect ($this->server, $this->dsn, $this->uid, $this->pwd)){
die("Verbindung zur Database fehlgeschlagen");
}
if(!$this->database = @odbc_connect ($this->database, $this->verbindung)){
die("Kann Database nicht öffnen");
}
}
...etc...
What I keep getting is:
Warning: SQL error: [Microsoft][ODBC Driver Manager] Ungültige Zeichenfolgen- oder Pufferlänge., SQL state S1090 in SQLConnect in c:\apache\htdocs\basis\test\access_inc.php on line 11
Verbindung zur Database fehlgeschlagen
😕 What am I doing wrong?
Greetings from Berlin, Germany
Alejandro Frasch
http://members.tripod.co.uk/Teuton