Aloha,
> Von: Glemnitz, Wolfgang[SMTP:[EMAIL PROTECTED]]
>
> i can the SAP-DB connected PHP over ODBC with String
>
> $dsn = "museum";
> $user = "gast";
> $pwd = "gast";
> $id = odbc_connect($dsn, $user, $pwd)
> or die ("Verbindungsaufnahme zum Datenbankserver fehlgeschlagen!");
>
> its ok.
>
ok, then php, odbc and sapdb are working ...
> Connect with PHP+PEAR over ODBC with String
>
> $db_typ = 'odbc';
> $user = 'gast';
> $pwd = 'gast';
> $db_host = 'localhost:3111';
> $dsn ='museum';
>
> $id = "$db_typ://$user:$pwd@db_host/$dsn";
>
> $db = DB::connect($id);
>
> if (DB::isError($db)){
> die ($db->getMessage());
> }
>
> DB Error: connect failed
>
> which format must having the String $id under Pear?
>
http://pear.php.net/manual/en/core.db.tut_dsn.php
Most variations are allowed:
phptype://username:password@protocol+hostspec:110//usr/db_file.db
phptype://username:password@hostspec/database_name
phptype://username:password@hostspec
phptype://username@hostspec
phptype://hostspec/database
phptype://hostspec
phptype(dbsyntax)
phptype
I would suggest
$id = 'odbc://gast:gast@localhost/museum';
(i use the database layer from phplib, so i didnt test it with pear::DB)
Regards, Mathias
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general