Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating SQL from ASP

Status
Not open for further replies.

mych

Programmer
Joined
May 20, 2004
Messages
248
Location
GB
Hi,

Not sure if this is the right forum so appologies upfront.

I have a series of asp pages that are a front end for an incidents diary which is a SQL7 database.

I can create new instances no problem and my updating works up to a point.

Each incident has the following fields.
IncidentTitle
IncidentDate
RaisedBy
System
Subsytem
Status
Updates
Resolution
DateClosed

Whenever an update is made the asp page will...
1. Do a SQL Select and store the current value for Updates in a string
2. Create an audit string comprising of Now() & CurrentUser and <BR>
3. Take the value of the NewUpdate Input textarea and cocactanate it with the audit string
4. Add this concactanated string to the end of the string storing the previous updates + a <HR>
5. Do a SQL Update to set the Updates field with the new string containing the previous updates + Audit string + New Update.

As I said this works fine up to a point and then fails. It seems that once I have an incident where the updates contain a chunck of updates. Its as if there is a limit to the legnth of the string...

The database has the field set to ntext.

Any help apreciated.
 
could you please post your sql query...

and the error you are getting...

-DNG
 
Also check the number of characters defined as field lengths in your database table.
 
Sorted my problem...

The Updates field was an ntext type field and in some cases contained 100s of k of data. Rather than pull in the whole field I found a comand UPDATETEXT that allowed me to just tag my audit and newupdate to the end of the updates field.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top