Obviously the major advantage of using the native MS-SQL extension is
performance (IHMO) maybe if you are running a few small apps then you won't
notice the connection overhead involved in establishing an odbc connection
to MSSQL.  I have found the MSSQL extension much faster in testing .

In addition using ODBC doesn't allow you to return the amount of rows
returned by a select query (but it does return the amount of effected rows
by an update or delete).

I'm not saying there aren't disadvantages to using the MSSQL ext. - it works
on an older interface (DB-LIB) and therefore lacks a few of the current
(MSSQL 2000) features only available via ADO or ODBC.

But I guess its just horses for courses.



-----Original Message-----
From: Frank Flynn [mailto:[EMAIL PROTECTED]]
Sent: 19 April 2002 22:21
Subject: Re: mssql problems

I had this exact same problem and after a lot of time I switched to an ODBC
connection (no mssql_connect...  Just use the ODBC commands) and everything
has worked flawlessly since.

There's probably some right combination and way to use the mssql specific
commands but life it too short and the ODBC stuff will do everything you
need anyway.  It worked first time and every time since for me.

Good Luck,

On 4/19/02 1:54 PM, "[EMAIL PROTECTED]"

> -----Original Message-----
> From: Rob Fraser [mailto:[EMAIL PROTECTED]]
> Sent: 19 April 2002 08:44
> Subject: mssql problems
> Dear All,
> I hope somebody can help me. I am new to PHP (I've used ASP for three
> years:-( ) and I'm loving PHP and trying to get my work to convert but
> I've coming across a error with mssql_query() explorer its just crashes
> with a php.exe 'memory could not be read error'. I'm sure it a school
> boy error from me but I'm just stuck, please help me code is......
> ===========
> $link = mssql_connect ("laptop", "sa", "elmwood");
> print ("<br>LINK was $link");
> $back = mssql_select_db ( "elmback",$link);
> print("<br>back was $back");
> $query = "SELECT * FROM tblperson";
> print("<br>query was $query");
> $result = mssql_query($query,$link); //JUST CRASHES ON THIS LINE
> $r = mssql_rows_affected ( $link);
> print("<br>rows affected was $r");
> $close =  mssql_close ($link);
> print("<br>close was $close");
> =========
> I run IIS4, NT4 (SP6a) and SQL 7 on the same machine as its my
> development one, out of date maybe but you should see my clothes but PHP
> was test downloaded a month ago - any ideas from a white knight?
> best regards
> Rob

Frank Flynn
Poet, Artist & Mystic

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to