Efficient way to access MS SQL server

Efficient way to access MS SQL server

am 30.01.2008 15:55:40 von Charlie

Currently using ODBC to connect to MS SQL server 2005. Profiling shows that
to fetch many rows requires a cursor based fetch of each record - a round
trip to SQL server for each. I would like to use some driver/interface from
PHP to SQL server that would get all rows in one round trip, or at least a
smaller number of round trips. The native SQL driver for PHP has a problem
with a limit on the number of characters in a string, so can't use that.

Is there anything better to use?

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

Re: Efficient way to access MS SQL server

am 31.01.2008 21:15:22 von leo.divinagraciaiii

charlie wrote:
> The native SQL driver for PHP has a problem
> with a limit on the number of characters in a string, so can't use that.
>


hmmm interesting. how much is the limit?

i used PHP's mssql_* functions and while i only used about 20 chars on a
character search string in the WHERE, i found them to be as simple as
the mysql_* functions...

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

Re: Efficient way to access MS SQL server

am 01.02.2008 09:59:58 von Evert Lammerts

There's a limit of 30 characters for column names, but only if you
connect to your mssql server from windows (more info on
http://hu2.php.net/mssql).

> The native SQL driver for PHP has a problem with a limit on the number
> of characters in a string, so can't use that.
I'm not sure what Charly means by this though...

Evert

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

Re: Efficient way to access MS SQL server

am 05.02.2008 01:49:29 von frank

Using the mssql extension based on Microsofts library (ntwdblib.dll) will
have limitations like column length 30 bytes and character columns has a
max length of 255 bytes.

If you use the same extension based on the FreeTDS version of the dblib
library these limitations goes away. Even on Windows platforms.

- Frank

> There's a limit of 30 characters for column names, but only if you
> connect to your mssql server from windows (more info on
> http://hu2.php.net/mssql).
>
> > The native SQL driver for PHP has a problem with a limit on the number

> > of characters in a string, so can't use that.
> I'm not sure what Charly means by this though...
>
> Evert
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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