[freetds] Sybase error

Michael Peppler mpeppler at peppler.org
Thu Apr 22 14:53:49 EDT 2004


On Thu, 2004-04-22 at 20:42, rconner at commspeed.net wrote:
> Thanks for the feedback
> 
> dbo_AMATS_Equipments is the name of the table.  So I think that that is as
> it should be.  I think what you mean would be the colums under that table
> like columname.dbo_AMATS_Equipments
> 
> Yes?

Normally "dbo" is the database owner, and is a username. So a table will
sometimes be qualified as "dbo.tablename" instead of "tablename". Seeing
the "dbo" at the begining of your table name made me think of a possible
typo.

Michael

> 
> Conner
> 
> 
> > On Thu, 2004-04-22 at 19:41, rconner at commspeed.net wrote:
> >> Thanks for the reply,
> >>
> >> Yes I tried that.  The problem seems to be the dbo_AMATS_Equipments.
> >> Any
> >> other Ideas?
> >
> > Shouldn't that be dbo.AMATS.Equipments ?
> >
> > Michael
> >
> >>
> >> > Have you tried the query without prefacing the column names with the
> >> table
> >> > name?
> >> >
> >> > i.e.:
> >> > SELECT EquipmentID, Model FROM dbo_AMATS_Equipments
> >> >
> >> > Deven
> >> >
> >> >
> >> >
> >> > On Thursday 22 April 2004 07:15 am, rconner at commspeed.net wrote:
> >> >> I am having a bit of a problem pulling information down with an SQL
> >> >> SELECT
> >> >> statment.  I connect to the db fine but then the SELECT statement is
> >> >> causing an error.
> >> >>
> >> >> Here is what I have.
> >> >> ---------------------------------------------------
> >> >> $query = "SELECT dbo_AMATS_Equipments.EquipmentID,
> >> >> dbo_AMATS_Equipments.Model FROM dbo_AMATS_Equipments";
> >> >>
> >> >> $result = mssql_query($query);
> >> >> $numRows = mssql_num_rows($result);
> >> >>
> >> >>
> >> >> while($row = mssql_fetch_array($result))
> >> >> {
> >> >>   echo "<br>$row[1]</br>";
> >> >> }
> >> >>
> >> >> ?>
> >> >> ---------------------------------------------
> >> >> and it returns this.
> >> >>
> >> >> Connected to TEST Server
> >> >> Connected to TEST db
> >> >>
> >> >> Warning: mssql_query(): Sybase message: Invalid object name
> >> >> 'dbo_AMATS_Equipments'. (severity 16) in
> >> >> /usr/local/apache2/htdocs/AMATS_test.php on line 26
> >> >>
> >> >> Warning: mssql_num_rows():  is not a Sybase result index in
> >> >> /usr/local/apache2/htdocs/AMATS_test.php on line 27
> >> >>
> >> >> Warning: mssql_fetch_array():  is not a Sybase result index in
> >> >> /usr/local/apache2/htdocs/AMATS_test.php on line 30
> >> >>
> >> >> I am using an Access frontend that you can actually create SQL
> >> >> statements
> >> >> in, so I am pretty sure the dbo_AMATS_Equipments is valid.  I
> >> currently
> >> >> use the same method to create SELECT statements for the MySQL
> >> database.
> >> >> Can someone shed some light on the errors?
> >> >>
> >> >> Thanks
> >> >>
> >> >> Conner
> >> >>
> >> >> _______________________________________________
> >> >> FreeTDS mailing list
> >> >> FreeTDS at lists.ibiblio.org
> >> >> http://lists.ibiblio.org/mailman/listinfo/freetds
> >> > _______________________________________________
> >> > FreeTDS mailing list
> >> > FreeTDS at lists.ibiblio.org
> >> > http://lists.ibiblio.org/mailman/listinfo/freetds
> >> >
> >>
> >> _______________________________________________
> >> FreeTDS mailing list
> >> FreeTDS at lists.ibiblio.org
> >> http://lists.ibiblio.org/mailman/listinfo/freetds
> > --
> > Michael Peppler                              Data Migrations, Inc.
> > mpeppler at 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
> >
> > _______________________________________________
> > FreeTDS mailing list
> > FreeTDS at lists.ibiblio.org
> > http://lists.ibiblio.org/mailman/listinfo/freetds
> >
> 
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
-- 
Michael Peppler                              Data Migrations, Inc.
mpeppler at 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




More information about the FreeTDS mailing list