I am having difficulty retrieving more than 4096 characters from the (text) datatype field.
I have been advised to retrieve this data block by block? however the Microsoft Documentation is not very clear unless you are a T-SQL expert(I am not)
My data field(comments_insert)is around(32,000)characters max, how do I simply extract this data and output it to html via SQL, Do I need some special T-SQL query to do this?
I will explain the whole process and I hope some one can help
******************The application*************
******************SPECS*******************
MSSQL SERVER 2000 enterprise
PHP4
Netscape Enterprise Server 3.6
table temp_approval
doc (char)
comments_insert (text) //this datafield will not exceed 32,000 characters
1. add_doc.php
<form "multipart\form-data" method="post" action="preview.php>
<textarea name="comments"></textarea>
<input type="image" name="submit" src="images/nextorg1.gif">
Description
this is where the user enters data to be inserted into the database
2. preview.php
<form enctype="multipart/form-data" action="insert_script.php" method="post">
<input type=hidden name="comments_insert" value="<?echo urlencode($comments);?>">
<?
echo ("$comments"
?>
<input type="image" name="insert_data" src="images/submtbtngryb.gif">
Description
this is where the user previews their data before they start the insert process
the data is passed from 1.preview.php via <textarea name="comments">
This is where $comments_insert is created via
<input type=hidden name="comments_insert" value="<?echo urlencode($comments);?>">
3. insert_script.php
$insert_temp_approval=mssql_query
("INSERT
INTO temp_approval (doc,comments_insert)
VALUES ('new','$comments_insert')
"
The variable for $comments_insert was created on the previous page via
<input type=hidden name="comments_insert" value="<?echo urlencode($comments);?>">
********************The Problem*****************
when I call the recordset with SQL statement
$find=mssql_query
("SELECT comments_insert
FROM temp_approval
Where doc = 'new'
"
while($row1= mssql_fetch_array($find))
{
$result= $row1["comments_insert"];
}
echo $result;
the maximun characters that are returned are 4096. So basically what is the problem with retrieving more than 4096 characters from the database? Is this MSSQL Server issue, or is this PHP4 issue or maybe something else?
Do I actualy need to retrieve this data block by block? Or do I need to modify my sql statement with some special T-SQL?
Some one please help, and dont tell me to read the MS BOOKS online, I am not a DB developer and it does not help me?
Thanks
I have been advised to retrieve this data block by block? however the Microsoft Documentation is not very clear unless you are a T-SQL expert(I am not)
My data field(comments_insert)is around(32,000)characters max, how do I simply extract this data and output it to html via SQL, Do I need some special T-SQL query to do this?
I will explain the whole process and I hope some one can help
******************The application*************
******************SPECS*******************
MSSQL SERVER 2000 enterprise
PHP4
Netscape Enterprise Server 3.6
table temp_approval
doc (char)
comments_insert (text) //this datafield will not exceed 32,000 characters
1. add_doc.php
<form "multipart\form-data" method="post" action="preview.php>
<textarea name="comments"></textarea>
<input type="image" name="submit" src="images/nextorg1.gif">
Description
this is where the user enters data to be inserted into the database
2. preview.php
<form enctype="multipart/form-data" action="insert_script.php" method="post">
<input type=hidden name="comments_insert" value="<?echo urlencode($comments);?>">
<?
echo ("$comments"
?>
<input type="image" name="insert_data" src="images/submtbtngryb.gif">
Description
this is where the user previews their data before they start the insert process
the data is passed from 1.preview.php via <textarea name="comments">
This is where $comments_insert is created via
<input type=hidden name="comments_insert" value="<?echo urlencode($comments);?>">
3. insert_script.php
$insert_temp_approval=mssql_query
("INSERT
INTO temp_approval (doc,comments_insert)
VALUES ('new','$comments_insert')
"
The variable for $comments_insert was created on the previous page via
<input type=hidden name="comments_insert" value="<?echo urlencode($comments);?>">
********************The Problem*****************
when I call the recordset with SQL statement
$find=mssql_query
("SELECT comments_insert
FROM temp_approval
Where doc = 'new'
"
while($row1= mssql_fetch_array($find))
{
$result= $row1["comments_insert"];
}
echo $result;
the maximun characters that are returned are 4096. So basically what is the problem with retrieving more than 4096 characters from the database? Is this MSSQL Server issue, or is this PHP4 issue or maybe something else?
Do I actualy need to retrieve this data block by block? Or do I need to modify my sql statement with some special T-SQL?
Some one please help, and dont tell me to read the MS BOOKS online, I am not a DB developer and it does not help me?
Thanks