473,386 Members | 1,801 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,386 software developers and data experts.

Textarea to sql 2000 text datatype

Hi All,
Does anyone have any example of asp.net code for saving a
textarea into a text/ntext column in sql table?

thanks

slyi

Nov 19 '05 #1
2 2888
Shouldn't be any different to storing any other type of data.
Are you having problems testing this normally?

Just create a Stored Procedure to do it, and set the parameter.
Worked for me

HTH

My Example:

*****************
Sql
******************

CREATE PROCEDURE [spname]
@MyNTextParam NTEXT
AS

INSERT INTO MYTABLE VALUES(@MyNTextParam)
*************
c#
*************

SqlCommand cmd = new SqlCommand([spname], [connectionstring]);
cmd.CommandType = CommandType.StoredProcedure;

cmd.Parameters.add(new SqlParameter("@MyNTextParam". SqlDbType.NText)).Value
= MyTextArea.Text;

//Open connection and execite cmd

<ad******@gmail.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
Hi All,
Does anyone have any example of asp.net code for saving a
textarea into a text/ntext column in sql table?

thanks

slyi

Nov 19 '05 #2
Thank you thats perfect.
i just see any examples on the web for this :o(

Nov 19 '05 #3

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

Similar topics

3
by: Krzysztof Kujawski | last post by:
Hi Is there posibility to (and how to do this): a) add a string in the current cursor position? b) add string before and after selection in textarea e.g. selection c) if I put with...
4
by: Csaba Gabor | last post by:
What I'd like to do is to be able to set the font of a textarea element to the same font that another element is using (say, for example, an <INPUT type=text ...> element, but if that's a no go,...
2
by: ph0ngwh0ng | last post by:
Hi, I am building a simple form with a textarea and a submit button. The problem is that when there is more than about 1700-1800 characters in the textarea, the form won't submit(you can click...
5
by: Jesper Rønn-Jensen | last post by:
I have a textarea that must be limited to 70 characters. No big deal -- at least so I thought. * Textarea must not exceed 70 characters * Exceeding content must be cut off * Must work on input by...
6
by: Tony | last post by:
The w3schools HTML tag reference for <textarea> http://www.w3schools.com/tags/tag_textarea.asp says that the attributes 'cols' and 'rows' are REQUIRED attributes for the textarea tag. Looking at...
1
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...
2
by: dennis.sprengers | last post by:
Ik ben bezig met een eigen UBB editor. Als iemand aan het typen is, zorgt CTRL-B voor een \-tag en nogmaals CTRL-B voor een \ tag. Als je eerst een selectie maakt en dan CTRL-B drukt, wordt de...
4
by: bgruha | last post by:
Hi I have a text area and a label. label(cntfieldld) represents the number of characters that still can be entered in the text area(xtxExpertise). I have written the following code: ...
2
by: thuythu | last post by:
Please help me.... I used and Javascript to view the data. But when i click button open a popup windows, then select data and click save button. The popup close and return the main page, but the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...

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.