473,511 Members | 17,577 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Text datatype

I have a problem within a procedure I am working on. I would like to
process every column in a table in a cursor. Now to my problem, I
can't save a column of type text into a cursor variable. It's not
allowed to use datafields of type text in this context. I also think
that I runned in to a simular kind of problem when trying to use text
columns in triggers.

Is there a way to evade this problem or is the only solutions to put
the text colum value into a varchar(8000)?

Regards,
Jenny
Jul 20 '05 #1
1 4853
Jenny (je***@megasol.se) writes:
I have a problem within a procedure I am working on. I would like to
process every column in a table in a cursor. Now to my problem, I
can't save a column of type text into a cursor variable. It's not
allowed to use datafields of type text in this context. I also think
that I runned in to a simular kind of problem when trying to use text
columns in triggers.

Is there a way to evade this problem or is the only solutions to put
the text colum value into a varchar(8000)?


In which case you will only get the first 8000 characters in the
text value. What you are you going to do with anyway?

The best would of course to be to try to avoid to use a cursor at all,
since using cursors is in the very most cases magnitudes slower than
set-based operations.

--
Erland Sommarskog, SQL Server MVP, so****@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2

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

Similar topics

1
11866
by: Steve | last post by:
Hi; I have a table with a TEXT datatype. Its a comment field. Right now the users who put in singlequotes are killing the web front end. The programmer responsible is fixing this issue but...
3
2503
by: Amanda H | last post by:
I just modified a SQL table field's datatype from char to text to accomodate more text, and suddenly the results are not being displayed on my webpage. Has anyone encountered this before? ...
1
2383
by: Steemer | last post by:
Okay, I checked with usual suspects and I'm still frustrated. ..txt file, fixed width. About 88 fields of varying length. All text fields. It will only let me add seperators to about the 410th...
1
1937
by: voidfill3d | last post by:
I have a field in a table that is of the datatype "Text". I also have a store procedure which updates this field and has a parameter of the same datatype ("Text"). However, in ASP.NET,...
6
1495
by: HappyHippy | last post by:
More of a minor niggle than anything but how would I remove the aforementioned space? eg. strName = 'World' print 'Hello', strName, ', how are you today?' comes out as "Hello World , how are...
1
1642
by: ChrisFrohlich | last post by:
ASP.NET 2.0 with Text DataTypes: I've got a similar question going in the SQL group, but I was wondering if anyone has successfully implemented reading/writing character data from a Text datatype...
0
1247
by: rejithes | last post by:
Hi, I had an application in which database swing will happen automatically. Some of my tables have field datatype - TEXT. It is found that the TEXT datatype is getting corrupted after database...
4
6924
by: vunet.us | last post by:
I want to know if this practice is effective and secure: I have been thinking about storing some data, which my users upload, in text files rather than database, since often I do not know how much...
0
1716
Krishna Ladwa
by: Krishna Ladwa | last post by:
In Sql Server 2000 Version, I found that no Notification message box appears when converting text column to varchar but the data gets truncated to the given size for the varchar. Whereas it appears...
0
2708
by: JamesOo | last post by:
I have the code below, but I need to make it searchable in query table, below code only allowed seach the table which in show mdb only. (i.e. have 3 table, but only can search either one only,...
0
7245
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
7144
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
7427
jinu1996
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...
1
7085
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
4741
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...
0
3214
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1577
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 ...
1
785
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
449
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.