Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Does the XML_RDB support Sybase? I can connect to Sybase by using the DBI and DBD, but when using:
use DBIx::XML_RDB; my $dsn = "DBI:Sybase:webitmstest"; my $dbx = DBIx::XML_RDB->new($dsn, "Sybase", $userid, $password)
I got result as:
DBI->connect(DBI:Sybase:webitmstest) failed:OpenClient message: LAYER += (6)....
and tell me requsted server name not found

It looks like the DBI connect does not include the user and password. Please help.

Edited by Ovid 2001-05-02

Replies are listed 'Best First'.
(Ovid) Re: DBIx-XML_RDB-0.05
by Ovid (Cardinal) on May 03, 2001 at 02:09 UTC

    Haven't used this module, so this is just a guess. From the documentation:

    my $xmlout = DBIx::XML_RDB->new($datasource, "ODBC", $userid, $password, $dbname) || die "Failed to make +new xmlout";

    In your code, you don't appear to be specifying a database name. If this is the issue, the error message is very misleading.

    DBI has a trace method. I'm assuming that you can access this to dump debugging information. It often results in a lot of stuff to wade through, but it lets you see what DBI is doing "under the hood".

    I know this is just a shot in the dark, but I hope it helps.

    Cheers,
    Ovid

    Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

Re: DBIx-XML_RDB-0.05
by busunsl (Vicar) on May 03, 2001 at 10:40 UTC
    You have to specify the server name in your dsn like this:
    Right from the docs:
    You can set the I<DSQUERY> environement variable: $ENV{DSQUERY} = "ENGINEERING"; $dbh = DBI->connect('dbi:Sybase:', $user, $passwd); Or you can pass the server name in the first argument to connect(): $dbh = DBI->connect("dbi:Sybase:server=ENGINEERING", $user, $passw +d);
      I can use the DBI connection to Sybase alone with no problem. The problem is when using the DBIx-XML_RDB module the passing parameters to DBI are not set correctly. The user and password are missing from the error output. my $dbx = DBIx::XML_RDB->new($dsn, "Sybase", $userid, $password) will create this error message: DBI->connect(DBI:Sybase:webitmstest) failed. at P:/perl/site/lib/DBIx/XML_RDB.pm line 46
(jeffa) Re: DBIx-XML_RDB-0.05
by jeffa (Bishop) on May 03, 2001 at 02:15 UTC
    (updated node)
    I have worked with XML_RDB with mysql and Oracle, but never Sybase. The answer to your problem most likely lies in the documentation for DBD::SyBase:
    $dbh = DBI->connect("dbi:Sybase:", $user, $passwd);
    You should be able to create a new object like so:
    my $xmlout = new DBIx::XML_RDB('Sybase',$user,$passwd);

    Jeff

    R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
    L-L--L-L--L-L--L-L--L-L--L-L--L-L--