Skip to Content.
Sympa Menu

freetds - Re: [freetds] Sybase error

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Deven Phillips <deven AT hcc.hawaii.edu>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Sybase error
  • Date: Thu, 22 Apr 2004 07:20:22 -1000

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(): 0 is not a Sybase result index in
> /usr/local/apache2/htdocs/AMATS_test.php on line 27
>
> Warning: mssql_fetch_array(): 0 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




Archive powered by MHonArc 2.6.24.

Top of Page