[PHP-DB] RE: mssql problems

2002-04-20 Thread Oliver Cronk

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.

Cheers

Ollie

-Original Message-
From: Frank Flynn [mailto:[EMAIL PROTECTED]]
Sent: 19 April 2002 22:21
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
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,
Frank

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

> -Original Message-
> From: Rob Fraser [mailto:[EMAIL PROTECTED]]
> Sent: 19 April 2002 08:44
> To: [EMAIL PROTECTED]
> 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 ("LINK was $link");
>
> $back = mssql_select_db ( "elmback",$link);
> print("back was $back");
>
> $query = "SELECT * FROM tblperson";
> print("query was $query");
>
> $result = mssql_query($query,$link); //JUST CRASHES ON THIS LINE
>
> $r = mssql_rows_affected ( $link);
> print("rows affected was $r");
>
> $close =  mssql_close ($link);
> print("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




RE: [PHP-DB] RE: mssql problems

2002-04-20 Thread Oliver Cronk

Hi Kras

> - Running PHP as the ISAPI module & make sure you have the latest version
> (you should get the latest version anyway).
Do you have problems with php in ISAPI mode with MSSQL permament
connections?

--> I don't use pconnect with ISAPI but maybe I should thinking about it(!)
so I can't help you with that, I noticed a huge performance boost just
switching from the CGI so didn't think about optimising the DB
connection  If I was you I would use 4.1.1 or 4.1.2 as I believe there
are a number of fixes for Windows / MS-SQL.  Make sure you copy the latest
php mssql extension dll over into system32 (or wherever you work from).

I ran it in that mode, and it was very fast and was working until timeouted
pconnection. After reconnection php isami dumped 'access violation...' .
Apart of that I have problems with some libraries in isapi mode, so maybe
you have some tips about it?
Yes I have had some problems in the previous versions of PHP but 4.1.2 seems
very robust and stable.  I seem to recall some problems with extensions but
I am afraid I can't really remember which ones - I know for sure that GD and
MSSQL worked fine but I think the IISadmin and pdf had problems (not a
problem for us as we don't use the functionality those modules provide at
present).

*my config: NT4 srv, SP6a,SRP, IIS4 w  the latest patches, PHP4.1.0,
libraries: GD, IMAP, PDF,zlib,MSSQL,DOMXML*

Hope that helps you further - sorry I can't be of more use but I stop using
NT4 a few months ago and I don't seem to be able to lay my hands on the docs
for the old server config (if they exist!) at the moment.

Cheers

Ollie

Final Year Computer Science Student @ Essex Uni, UK ( www.cronky.net )
and E-Government Developer currently working on behalf of Maidstone Borough
Council, UK
( www.digitalmaidstone.co.uk )




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




[PHP-DB] Re: mssql problems

2002-04-19 Thread Frank Flynn

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,
Frank

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

> -Original Message-
> From: Rob Fraser [mailto:[EMAIL PROTECTED]]
> Sent: 19 April 2002 08:44
> To: [EMAIL PROTECTED]
> 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 ("LINK was $link");
> 
> $back = mssql_select_db ( "elmback",$link);
> print("back was $back");
> 
> $query = "SELECT * FROM tblperson";
> print("query was $query");
> 
> $result = mssql_query($query,$link); //JUST CRASHES ON THIS LINE
> 
> $r = mssql_rows_affected ( $link);
> print("rows affected was $r");
> 
> $close =  mssql_close ($link);
> print("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




[PHP-DB] RE: mssql problems

2002-04-19 Thread Oliver Cronk

Hi PHP Is quite cool isn't it As for your problem you might want to try
a few things:

- Running PHP as the ISAPI module & make sure you have the latest version
(you should get the latest version anyway).
- Removing this line : $r = mssql_rows_affected ( $link); - as there is a
mysql function for this but not mssql - it should have read -
mssql_rows_affected($result) anyway I believe - it works on the result
rather than the connection).

Can't really think of any thing else without more info, although I've had
bad experiences with trying to run MSSQL / IIS on the same NT4 box (although
on 2000 and XP it's fine) - one of my colleages solution was to run Apache
for win32 instead of IIS as there appeared to be clashes between SQL and IIS
(something we have since rectified).

Good luck

Ollie

-Original Message-
From: Rob Fraser [mailto:[EMAIL PROTECTED]]
Sent: 19 April 2002 08:44
To: [EMAIL PROTECTED]
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 ("LINK was $link");

$back = mssql_select_db ( "elmback",$link);
print("back was $back");

$query = "SELECT * FROM tblperson";
print("query was $query");

$result = mssql_query($query,$link); //JUST CRASHES ON THIS LINE

$r = mssql_rows_affected ( $link);
print("rows affected was $r");

$close =  mssql_close ($link);
print("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



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