Skip to Content.
Sympa Menu

freetds - RE: MSSQL Queries not working?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Louis Romestant" <louisr AT mindspring.com>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: RE: MSSQL Queries not working?
  • Date: Wed, 9 Jan 2002 14:42:44 -0500


Zara;

I've been using FreeBSD and MSSQL 7.0. I'm not sure if using 2000 makes a
difference, but I would try simple, possibly silly things, like specifying
the connection in the call to mssql_query and mssql_select_db, doing a
select without a condition, using literal strings for all my args in all my
functions and I wouldn't die() (just to make sure any complaint from PHP
comes through unfettered).

Not much help I know, and I'm sure you thoughtof this stuff, but who knows?

Louis


----- Original Message -----
From: "Gonzalez, Zara E" <gonzalze AT mail.slh.wisc.edu>
To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
Sent: Wednesday, January 09, 2002 2:21 PM
Subject: [freetds] RE: MSSQL Queries not working?


> As far as I can tell, this isn't my problem. Although I was unaware of the
> sybase_ functions, replacing my mssql_ with sybase_ did not fix my
problem.
>
> Oh and yes I am using PHP on a linux box running redhat 7.0 and PHP 4.1.0.
(I
> forgot to mention that before)
>
> Any other suggestions?
>
> Thanks,
>
> Zara Gonzalez
>
> -----Original Message-----
> From: Patrick Muldoon [mailto:doon AT inoc.net]
> Sent: Wednesday, January 09, 2002 1:07 PM
> To: TDS Development Group
> Subject: [freetds] RE: MSSQL Queries not working?
>
>
> Hmm,
>
> Looks like php.
>
> You can't user MSSQL on unix, you need to use the Sybase series of
functions.
>
> From http://www.php.net/manual/en/ref.mssql.php
>
> The MSSQL extension is available on Win32 systems only. You can use the
Sybase
> extension to connect to MSSQL databases from other platforms.
>
>
> Hope this helps,
>
> Patrick
>
>
>
>
>
> -----Original Message-----
> From: bounce-freetds-134458 AT franklin.oit.unc.edu
> [mailto:bounce-freetds-134458 AT franklin.oit.unc.edu] On Behalf Of Gonzalez,
Zara
> E
> Sent: Wednesday, January 09, 2002 2:03 PM
> To: TDS Development Group
> Subject: [freetds] MSSQL Queries not working?
>
> Hi,
>
> I have Freetds 0.53 connecting to a MSSQL 2000 box...
> I can't seem to pull information out of the database. I can insert, but
not pull
> data out.
>
> Am I using the wrong code? Here is the code that is not working. It seems
to be
> failing on the $result line since when I comment that line out, I at least
get
> an error. If that line isn't commented then all I get is "Page cannot be
> displayed".
>
> Any Ideas or suggestions?
>
>
>
> mssql_connect(DB_HOST, DB_USER, DB_PW) or DIE("Error: Server failed to
> respond.");
> mssql_select_db(DB_NAME) or DIE("Error: Could not connect to table.");
>
> $query = "SELECT * FROM test where id = '$id'";
> $result = MSSQL_QUERY($query) or DIE("Error: Could not handle Query."); $r
=
> MSSQL_FETCH_ARRAY($result) or DIE("Error: Could not process result.");
> $data = $r["data"];
>
> Thanks,
>
> Zara Gonzalez
>
> ---
> You are currently subscribed to freetds as: [doon AT inoc.net]
> To unsubscribe, forward this message to
> $subst('Email.Unsub')
>
>
> ---
> You are currently subscribed to freetds as: [gonzalze AT mail.slh.wisc.edu]
To
> unsubscribe, forward this message to
$subst('Email.Unsub')
>
> ---
> You are currently subscribed to freetds as: [louisr AT mindspring.com]
> To unsubscribe, forward this message to
$subst('Email.Unsub')





Archive powered by MHonArc 2.6.24.

Top of Page