473,385 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

PHP / MSSQL

Hallo,

i have a MS SQL Database with some tables with textfields.
in the textfields are long strings ... but i cant get the full string
from the table ... i get only ca. 8000 chars ...

Mark
Apr 7 '06 #1
7 3185
Hmm, have you tried it with a PostgreSQL database? That might work.

Apr 7 '06 #2
rlee0001 wrote:
Hmm, have you tried it with a PostgreSQL database? That might work.

I have tried it with MySQL - it works.

But i have to use for this one Project an MSSQL Server.

What can i do?

Mark
Apr 7 '06 #3
Mark Knochen wrote:
Hallo,

i have a MS SQL Database with some tables with textfields.
in the textfields are long strings ... but i cant get the full string
from the table ... i get only ca. 8000 chars ...

Mark

MSSQL has an 8000 character limit for varchar.
NOTE: the driver used by PHP only supports 255 characters in a varchar.

text (the data type not the type of data) has a limit of 2^31-1 bytes.

So, you need to store the value as text not varchar. You can probably
use CONVERT to move from varchar to text.

-david-

Apr 8 '06 #4
Mark Knochen wrote:
Hallo,

i have a MS SQL Database with some tables with textfields.
in the textfields are long strings ... but i cant get the full string
from the table ... i get only ca. 8000 chars ...

Mark


Another thing...
Since text is stored using a different mechanism than varchar (i.e. in a
different location) saving and retrieving text may be a slower operation.

-david-

Apr 8 '06 #5
Mark Knochen wrote:
Hallo,

i have a MS SQL Database with some tables with textfields.
in the textfields are long strings ... but i cant get the full string
from the table ... i get only ca. 8000 chars ...

Mark


Try to change the following values in the php.ini

; Valid range 0 - 2147483647. Default = 4096.
mssql.textlimit = 4096

; Valid range 0 - 2147483647. Default = 4096.
mssql.textsize = 4096

Apr 8 '06 #6

Tjoumaidis Tassos wrote:
Mark Knochen wrote:
Hallo,

i have a MS SQL Database with some tables with textfields.
in the textfields are long strings ... but i cant get the full string
from the table ... i get only ca. 8000 chars ...

Mark


Try to change the following values in the php.ini

; Valid range 0 - 2147483647. Default = 4096.
mssql.textlimit = 4096

; Valid range 0 - 2147483647. Default = 4096.
mssql.textsize = 4096


Setting these two using ini_set() prior to making the connection also
works.

Apr 8 '06 #7
>>; Valid range 0 - 2147483647. Default = 4096.
mssql.textlimit = 4096

; Valid range 0 - 2147483647. Default = 4096.
mssql.textsize = 4096

Setting these two using ini_set() prior to making the connection also
works.


The CREATE TABLE was:

CREATE TABLE modul (
ID int NOT NULL IDENTITY ,
"text" text NOT NULL default '',
PRIMARY KEY (ID)
);

I set these settings:

ini_set("mssql.textlimit",409600);
ini_set("mssql.textsize",409600);

But nothing works.

I cant get the full text from the table ...

Mark
Apr 8 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: badz | last post by:
Hi frenz Lately I try to use MSSQL and PHP , the problem arise when PHP try to read MSSQL field with 'image' data type, header("Content-type: image/jpeg"); // act as a jpg file to browser I...
7
by: mj | last post by:
Hello, thanks for the help. I am running a WinXP Pro w/ SP2 (my home computer, with ZoneAlarm firewall) Apache 2.0.52 MySQL 4.1.7 PHP 5.1.0-dev I have developed a PHP/MySQL web app that...
1
by: JackTorrance | last post by:
Hi i have a problem with IIS6 and MSSQL and i hope that someone can help me. this is the configuration: Windows 2003 IIS6 MSSQL 7.0 Standard Edition ADO 2.5
14
by: Kukurydz | last post by:
I've got such problem: My database is stored on MSSQL Server. I have to write reports for it in MSAccess. I've got a problem with creating a query which will select records from MSSQL table with...
3
by: gharmel | last post by:
I'm trying to get some clues on why I get (much) slower responses from my PHP applications when dealing with a remote sql server as opposed to a local sql server. Here's my situation: Server...
11
by: ralphie | last post by:
hi all since nearly 2 days i fight with mssql and utf-8 as i need to store and retrieve arabic characters. i tried the com approach ...
0
by: DariuszK | last post by:
I am greeting I would like to consult the better solution(with security consideration) to the access is for MSSQL(2005) from ASP(Classic) in the system of the intranet. a) SQL mixed mode and...
8
by: php-taz | last post by:
I built a PHP website on Windows 2000 (using IIS) that connects to a SQL Server 2000 database using the mssql functions. I migrated the website and the database onto a Windows 2003 machine, and...
0
by: Derftics | last post by:
Hi Guys, Is there anyone who have tried installing MSSQL 2000 and MSSQL 2005 servers in one desktop computer? I have tried using MSDE and successfully install the MSSQL 2000 server but when I...
14
by: guswebb | last post by:
Hi. I'm a newbie to PHP and am having a few problems as follows... I have installed PHP successfully on server 1 which is running IIS 6 (W2k3) and hosting multiple sites, some of which connect to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.