473,406 Members | 2,387 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,406 software developers and data experts.

AppendChunk method with SQL Server

Hi all,

I have an asp page that writes to an ntext field in SQL Server 2000.
All was going well until I had to put in a section of text greater than 8000
bytes.
Then I got a timeout error and the update wouldn't go through.
After reading that 2000 only accepts chunks of 8000 bytes or under at a
time, I attempted to use the AppendChunk method.
The code I wrote seems to work first time I enter text in the page, no
matter how big. But when I try to update the ntext file,
if it is more than 8K, it just sits there and nothing happens. Now I dont
even get a timeout error.
From what I read, I was assured this would work.
For small text files under 8K it works beautifully, I can add and remove
text and it all works fast.
But as soon as the ntext field gets beyond that size its totally unworkable,
and seems to be just the same as using the standard UPDATE method. I've
attached the code.

If anyone has any suggestions I would be eternally grateful, this is driving
me nuts. I've attached the offending code.

Thanks

Bill
' ***********************************************

' * PageStatus: SAVE Action: EDIT *

' ***********************************************

IF PageStatus = "SAVE" AND Action = "EDIT" THEN

sqlc = "SELECT * from " & tblName
Dim FldVal

Dim rs

Set rs = Server.CreateObject("ADODB.Recordset")
rs.cursortype = 1

rs.cursorlocation = 3

rs.locktype = 3
rs.Open sqlc, oConn

iChunk = 254

cTxtDescription = SQLReady(FileUp.Form(lang))

For iNo = 1 to len(cTxtDescription) step iChunk

iStartAt = iNo

cWorkString = mid(cTxtDescription, iStartAt , iChunk )

Response.Write "At byte " & iNo & vbCRLF & "<br/>"
rs.Fields("SimpleChinese").AppendChunk(cWorkString )

Next

IF Page_Err = "OK" THEN

' Perform the Query

rs.Update

rs.Close

Set rs = Nothing

Set oConn = Nothing

END IF

END IF

Jul 19 '05 #1
0 1458

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

Similar topics

1
by: qwejohn | last post by:
Hello, I had posted this question in the twisted mailing list but did not got a solution ; I hope that the python Gurus of this forum can help me a bit. I am trying the exmaple in the python...
1
by: Bill | last post by:
Hi all, I have an asp page that writes to an ntext field in SQL Server 2000. All was going well until I had to put in a section of text greater than 8000 bytes. Then I got a timeout error and...
5
by: sk | last post by:
Hi, I'm trying to override the Render method of my Page class. Are there any standard guidelines for this? Thanks. Shardul
5
by: rk325 | last post by:
Yes, I've seen many posts about this type of error, and none of the solutions people applied worked for me. So please read this one carefully and help me if you can. I have a web service...
1
by: Bill Hutchison | last post by:
I'm having trouble getting more than 2000 characters into an Oracle 10g CLOB column, and was trying to use the AppendChunk method in Access 97. I guess I haven't broken the code yet, since I still...
16
by: Mark | last post by:
Hello. I am attempting to use AppendChunk() to write binary data to a memo field in Access 2000. My initial call to AppendChunk() results in a data type conversion error. Any suggestions? Here...
0
by: Erik | last post by:
Why isn't my update method getting called? Pasted below is an aspx from a 1.1 application I'm working on. It has two textboxes and a button for inserting data into the database, and a datagrid...
5
by: rn5a | last post by:
The .NET 2.0 documentation states the following: When using a DataSet or DataTable in conjunction with a DataAdapter & a relational data source, use the Delete method of the DataRow to remove...
2
by: =?Utf-8?B?QUEyZTcyRQ==?= | last post by:
ADO has GetChunk & AppendChunk, features that are not supported by ADO.NET. Is there a workaround in ADO.NET? I am trying to write large files to LOB fields in a database table.
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
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,...
0
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...
0
Oralloy
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,...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.