Re: Strange problems with DBD::Sybase and a simple query

From: Michael Peppler (mpeppler_at_peppler.org)
Date: 10/19/04


To: dbi-users@perl.org
Date: Tue, 19 Oct 2004 17:25:41 +0200

On Tue, 2004-10-19 at 15:38, Logan Capaldo wrote:
> Hello, I am having some very irritating problems with DBI and
> DBD::Sybase. I have tried Googling to no avail. What it breaks down to
> is that a query issued with WinSQL for example, will work fine, but
> the identical query issued through the DBI interface will give me an
> error of the following form:
>
> script.pl (Error): DBD::Sybase::st execute failed: Server message
> number=208 severity=16 state=1 line=1 server=namechanged
> text=dbo.table_name_changed not found. Specify owner.objectname or use
> sp_help to check whether the object exists (sp_help may produce lots
> of output).

Most likely the database that you are in when using WinSQL is different
from the one that DBD::Sybase is in, so the table doesn't exist in the
current database.

You can either specify the database to use in the connect() call, or
fully qualify the table name:

select ... from <database>.<owner>.<tablename> where ...

Michael

-- 
Michael Peppler                              Data Migrations, Inc.
mpeppler@peppler.org                       http://www.peppler.org/
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or 
long term contract positions - http://www.peppler.org/resume.html


Relevant Pages

  • RE: fetchrow_array performance
    ... I agree - set RasieError. ... it is impossible to tell what is going on in the database without a 10046 trace. ... You aren't error checking your dbi statements - do you have RaiseError ... sender of the delivery error by replying to this message, or notify us by ...
    (perl.dbi.users)
  • Re: Evaluated "require $database" not found.
    ... DBI Error 1046: No database selected ... What I have found is that if the spaceare removed as per the correct syntax, then the DBI_errorhandler will trap and report a connection failure if a non-existent database is specified, as per this example: ... This requires that you first have an installation of mysql setup on a host ...
    (perl.dbi.users)
  • Re: Cant call method "prepare" on an undefined value
    ... Somehow you managed to have an undefined value instead of a DBI database handle in front of ->prepare, which is burried deep inside Oraperl.pm. ... Oracle HTTP Server at Server B. Both server are Solaris server. ... I have installed DBI and DBD into Server B and setup the oraperl in my perl script. ...
    (perl.dbi.users)
  • Balasan: RE: Balasan: RE: Balasan: RE: Balasan: RE: cant execute "use $database"
    ... dictionary of the each database of my MSSQL. ... to load it -- DBI will load it for you. ... Subject: Balasan: RE: Balasan: RE: Balasan: RE: ...
    (perl.dbi.users)
  • Re: Evaluated "require $database" not found.
    ... I'm familiar with error trapping as described in "perldoc DBI" - ... Transactions are a fundamental part of any robust database system. ... Ron Wingfield ... of how you do a simple DBI connection. ...
    (perl.dbi.users)