473,581 Members | 2,884 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
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.


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

' * PageStatus: SAVE Action: EDIT *

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

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

sqlc = "SELECT * from " & tblName
Dim FldVal

Dim rs

Set rs = Server.CreateOb ject("ADODB.Rec ordset")
rs.cursortype = 1

rs.cursorlocati on = 3

rs.locktype = 3
rs.Open sqlc, oConn

iChunk = 254

cTxtDescription = SQLReady(FileUp .Form(lang))

For iNo = 1 to len(cTxtDescrip tion) step iChunk

iStartAt = iNo

cWorkString = mid(cTxtDescrip tion, iStartAt , iChunk )

Response.Write "At byte " & iNo & vbCRLF & "<br/>"
rs.Fields("Simp leChinese").App endChunk(cWorkS tring)


IF Page_Err = "OK" THEN

' Perform the Query



Set rs = Nothing

Set oConn = Nothing



Jul 19 '05 #1
0 1468

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

Similar topics

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 docs - http://twistedmatrix.com/users/warner/doc-latest/web/howto/using-twistedweb.xhtml Configuring and Using the Twisted.Web Server - Twisted...
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 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...
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
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 application installed in a Windows 2000 SP4 Domain control server. It is running IIS 5.0. I can access the WS from its own web page, and, when I access it...
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 haven't been able to get more than 2000 chars into the field, or maybe I should say that when I do, my module errors out on the line which says...
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 is a VBA function which demonstrates the problem. Thanks -Mark
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 for editing and deleting data. When a user clicks on the "Edit" button in the datagrid, Edit() method is called and the appropriate row is changed...
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 the row. The Delete method marks the row as Deleted in the DataSet or DataTable but does not remove it. Instead when the DataAdapter encounters a row...
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.
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.