Hello everyone! I am using PHP. I need to save data from <textarea> to MSSQL. I want that user will copy and paste data from MS Excel. I used the form method=Post. My data type is text with length 7000
My problems are:
1) Not all data posted is saved.
2) When I try to edit the data through <textarea> then submit, data on the last row portion is lost. I can't trace why coz when I look in the database LongText is only I could see. I also tried viewing thru SQL Analyzer but only the first row of the data can be viewed.
3) I tried searching and met the sp_tableoption , textinrow and @ptr. I dont understand how to use it.
My codes for saving:
$insert="INSERT INTO Itb (itbNo, myLongText) VALUES ('$itbNo', '$myLongText')";
$result= mssql_query($insert);
My codes for updating:
$update="UPDATE Itb SET myLongText='$myLongText' where itbNo = '$itbNo'";
$result = mssql_query($update);
Anyone could please help? Thanks!
6 2445
Hello everyone! I am using PHP. I need to save data from <textarea> to MSSQL. I want that user will copy and paste data from MS Excel. I used the form method=Post. My data type is text with length 7000
My problems are:
1) Not all data posted is saved.
2) When I try to edit the data through <textarea> then submit, data on the last row portion is lost. I can't trace why coz when I look in the database LongText is only I could see. I also tried viewing thru SQL Analyzer but only the first row of the data can be viewed.
3) I tried searching and met the sp_tableoption , textinrow and @ptr. I dont understand how to use it.
My codes for saving:
$insert="INSERT INTO Itb (itbNo, myLongText) VALUES ('$itbNo', '$myLongText')";
$result= mssql_query($insert);
My codes for updating:
$update="UPDATE Itb SET myLongText='$myLongText' where itbNo = '$itbNo'";
$result = mssql_query($update);
Anyone could please help? Thanks!
Check the structure of your table. What's the data type of column "myLongText"? Is it big enough to hold your entire text?
-- CK
Check the structure of your table. What's the data type of column "myLongText"? Is it big enough to hold your entire text?
-- CK
Hi! The data type of "myLongText" is text and its Length is 7000. Enough to hold the text, i guess.
I am also wondering why the data specifically on the last rows is lost. What I did was retrieve the data then save it. But when I retrieve again some data is lost.
Help on this pls.
Hello everyone! I am using PHP. I need to save data from <textarea> to MSSQL. I want that user will copy and paste data from MS Excel. I used the form method=Post. My data type is text with length 7000
My problems are:
1) Not all data posted is saved.
2) When I try to edit the data through <textarea> then submit, data on the last row portion is lost. I can't trace why coz when I look in the database LongText is only I could see. I also tried viewing thru SQL Analyzer but only the first row of the data can be viewed.
3) I tried searching and met the sp_tableoption , textinrow and @ptr. I dont understand how to use it.
My codes for saving:
$insert="INSERT INTO Itb (itbNo, myLongText) VALUES ('$itbNo', '$myLongText')";
$result= mssql_query($insert);
My codes for updating:
$update="UPDATE Itb SET myLongText='$myLongText' where itbNo = '$itbNo'";
$result = mssql_query($update);
Anyone could please help? Thanks!
Try to display the value of your $insert. Copy and paste it on Query Analyzer. Let's go from there.
-- CK
Try to display the value of your $insert. Copy and paste it on Query Analyzer. Let's go from there.
-- CK
Hi! Yes, I copied and paste it on Query Analyzer.. and the query is successful. I dont know where to go from there. :-) I am stuck.
Then it seems the problem happens when the data is being transmitted to sql-server, since your query is built properly, I'm not much of a PHP programmer, so I can figure out if your problem is in PHP or not.
Sorry, not much help.
-- CK
Yehey! Guyz, I got the answer on my problem why some data rows are missing even my SQL is correct. In my php.ini, I changed the default to maximum. :-)
; Valid range 0 - 2147483647. Default = 4096.
mssql.textlimit = 2147483647
; Valid range 0 - 2147483647. Default = 4096.
mssql.textsize = 2147483647
Thanks everyone!
Sign in to post your reply or Sign up for a free account.
Similar topics
by: shottarum |
last post by:
I currently have 2 tables as follows:
CREATE TABLE .
(
mhan8 int,
mhac02 varchar(5),
mhmot varchar(5),
mhupmj int
)
|
by: serge |
last post by:
I have a scenario where two tables are in a One-to-Many relationship
and I need to move the data from the Many table to the One table so
that it becomes a One-to-One relationship.
I need to...
|
by: Philip Boonzaaier |
last post by:
I want to be able to generate SQL statements that will go through a list of
data, effectively row by row, enquire on the database if this exists in the
selected table- If it exists, then the colums...
|
by: robert |
last post by:
been ruminating on the question (mostly in a 390/v7 context) of
whether, and if so when, a row update becomes an insert/delete.
i assume that there is a threshold on the number of columns of
the...
|
by: Shapper |
last post by:
Hello,
I have created 3 functions to insert, update and delete an Access
database record. The Insert and the Delete code are working fine.
The update is not. I checked and my database has all...
|
by: Mark Harrison |
last post by:
So I have some data that I want to put into a table. If the
row already exists (as defined by the primary key), I would
like to update the row. Otherwise, I would like to insert
the row.
I've...
|
by: V T |
last post by:
Hello all,
SQL Server 2000 documentation
http://www.microsoft.com/technet/prodtechnol/sql/2000/reskit/part10/c3761.mspx
states that if view is using "NOT NULL" columns of a base table, then...
|
by: abhi81 |
last post by:
Hello All,
I have a table on which I have created a insert,Update and a Delete trigger. All these triggers write a entry to another audit table with the unique key for each table and the timestamp....
|
by: =?Utf-8?B?UmljaA==?= |
last post by:
On a form - I have a datagridview which is docked to the entire form. The
datagridview allows users to Delete and/or Add Rows. On the Form_Load event
I Fill the datagridview source table with a...
|
by: magnolia |
last post by:
i created a trigger that will record the changes made to a table .everything works fine except the insert query.whenerever i try to insert a record it fires insert and update triger at the same time...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |