Datatypes That Preserve Rich Text
Feb 1, 2007
Hey there -
I have a textbox (C# 1.1 OR 2.0) that I want to take it's contents and post to a datatype of some sort in SQL2k5 and have it preserve the breaks (return keystrokes) so when the data is presented, it can hold a paragraph form. Is this possible?
something like this: <asp:TextBox id="txtContent" runat="server" TextMode="MultiLine" Rows="10"></asp:TextBox>
Right now, I'm using nvarchar(4000) as the datatype but if I were to type, say 3 paragraphs, the data returned in the datagrid I bind that data to shows only one long string of data. For the time being, I have been puttting HTML formatting tags in the content I'm posting to the DB, but ultimately don't want to have to do that. I don't want to have to use a Text Editor (like FTB or FCKeditor) if necessary because they seem very much involved for the simple need I have which is to preserve paragraph formatting.
So, is there another datatype in SQL2k5 that I should be using? Or are there simple code snippets I can utilize that will recognize a carriage return as a </p><p> tag?
I'm trying to migrate to 2.0 as much as possible, so any C# code would be greatly appreciated in 2.0!
Thanks for your help!
iSheahan
View 1 Replies
ADVERTISEMENT
Nov 20, 2007
This question has been asked a lot, without a definitive answer. Can you tell me if SQL Server 2008 will support rich text. I believe the November CTP does not have this functionality. It is a pretty important decision regarding my organization's adoption of the new product.
Thank you
Jason
View 1 Replies
View Related
Aug 4, 2006
I currently have a simple project where we need to store paragraphs for letters that will be automatically printed and then mailed to cusomters. These letters will be created based on certain criteria.
I have the SQL database set up with two fields...the paragraphCode (which is the key) and then the paragraph. These paragraphs were originally created in Word and some of these paragraphs contain bulleting and other rich text features. I have built a small utility in ASP (using VB .Net) for our intranet to view / insert / edit these paragraphs. If a user is copying and pasting the paragraph from a Word document, what should this paragraph field's datatype be declare as? It is currently NVARCHAR(MAX).
Thanks for the information
View 3 Replies
View Related
Jan 27, 2005
Hey folks,
Just a quick question to ask what is the best field to store the data held in a rich text box/control. Just want to make sure that i get it right first time you know. Not sure about the amount of characters that needs held but its going to be quite a lot as this field shall contain most of my pages content.
Appreciate any help
Thanks
Turklad
View 3 Replies
View Related
Aug 25, 2006
Dear All
I want to create a RichTextBox, and then i want to show picture and Text at a time, suppose
Welcome to MSDN Forum
how can i accompalished this task.
Thanks
View 3 Replies
View Related
Jul 20, 2005
Sorry if this seems a little basic, but I'm putting together an applicationwhere large amounts of text will be required in a single record - way morethan 8000 characters.What's the normal way of coping with this? Splitting into multiple recordseach with a max of 8000 chars?Thanks,JC
View 3 Replies
View Related
Feb 6, 2007
I have a field where the data is stored with RTF. I know SQL Reporting Services cannot display it properly. Is there way to remove the RTF formatting codes through a function to just pull out the text and displya it in the text box?
View 4 Replies
View Related
Feb 24, 2003
Does anyone know where I can find a freeware Rich Text to HTML ActiveX Control?
View 1 Replies
View Related
Jun 28, 2007
Hi,
I want to execute some queries inside a stored procedure, get the data and create from them some strings with formatted parts (bold, italic, underline, different color fonts) and save them in a text field. These strings are going to be displayed in some DBRichText control in a database application built with Delphi. Is there an easy way to create these complex rtf formats in MSSQL
or some ideas regarding this problem?
Best Regards,
Manolis Perrakis
View 1 Replies
View Related
Aug 21, 2007
Hi
(Note when I say "rich" text I don't specifically mean rich text, I'm refering to text with user defined bold, italic, numbered lists, colors, fonts, etc.)
We have a (new) system where we want a user to enter "rich" text notes into a single column using an editor embedded in our application (much like the editor I'm using for this forum) and have the notes displayed correctly in SSRS reports. We were thinking of storing the notes as HTML but I've just tried it and the report displays the whole HTML string, rather than marking up the text.
We are open to marking up the text using any mechanism, rich text, HTML, Word, etc. just as long as we can see it in the reports.
We also need to consider viewing the same notes via Crystal reports.
Thanks in advance for any advice.
Michael
View 3 Replies
View Related
May 14, 2008
I have the following code tha imports the contents of a text file into a varchar(max) field.
Unfortunately the CR/LF are stripped out when I look at the field.
How can I preserve them?
Code Snippet
DECLARE @obj VARCHAR(MAX)
SELECT @obj=BulkColumn
FROM
OPENROWSET(BULK 'C:qsiObjectCreation.sql',SINGLE_CLOB) AS ExternalFile
insert into scriptor (script) values (@obj)
View 2 Replies
View Related
Feb 19, 2001
Hi,
Is anybody can tell me why I can't have more than 255 characters in a field with text datatype?
The insert and the retreive is done directly using ISQL...
Thanks a lot for your assistance
Patrick
View 2 Replies
View Related
Sep 8, 2000
I would like to concatenate text datatypes. Is this possible??
I'm using field1 + " " + field2
I cannot convert to varchar since the size is larger than 8000.
Thanks, Vic
View 1 Replies
View Related
Oct 8, 2004
Hi ya... About to tear my hair out.
I thought i fixed this problem, as it WORKED about two days ago, but now I'm getting errors.
I have a series of text files, some are delimited, some are fixed width. I previously was able to import these files thru a dts package by creating the table in a stored procedure. Exple:
CREATE TABLE [Pol_Dump073104]
(
[Product_Type] varchar (12) NULL,
[Benefit] float NULL,
[Base_Premium] varchar (12) NULL,
[Rider_Premium] float NULL,
[Contract_Value] float NULL,
)
I then import the text file into the table and then cast the float datatypes as money in a select into statement to do aggregate functions on the money fields. this worked previously, but now I'm receiving this: 'Error converting datatype char to money.' I tried to convert to float and received the same error, only with float where the word money was.
Please help! :mad:
Thanks
View 5 Replies
View Related
Jul 12, 2005
Hi, I'm a noob who sucks at programming, and sucks even more when it comes to database.
I'm operating a small website with an SQL Server database that drives my shopping cart. I want to close this website down, but I don't want to lose all the data in the database in case I want to do something in the future.
How do you backup the entire database into a file so i might be able to import it at later times? Do I have to do this with SQL, T-SQL, or the manager?
View 3 Replies
View Related
Jul 20, 2005
Hi,I restored a database 2 months ago. After the restore, I lost all my"users" for that database. It has been a while, so I don't rememberthe detail of what I did.How can I reserve all the users when restoring a database from a file?Did I do something wrong?Thank you in advance,Eddy
View 1 Replies
View Related
Dec 11, 2007
Not exactly a TSQL question. Query Editor in Management Studio keeps reformatting my sql code every time I hit save, making the code much harder to read. Is there a way to preserve line breaks and indentation in the SQL when creating a view? Thanks.
View 1 Replies
View Related
Feb 21, 2005
How do I move data from one server and append to the same table structure on a second server and preserve the foreign key relationships. In other words TableB.TableA_ID references TableA.ID. The IDENTITY ID numbers themselves will change but they must continue to match up on the destination server the way they did on the source server.
I can do this using procedural programming but that is usually not the way to go.
(btw, this is a cleaned up version of a question I tacked on to another thread)
View 7 Replies
View Related
Oct 1, 2006
I have a default installation of SQLServer2000 on a host runningWin2003. I want to install SQLServer2005 on the same machine, butpreserve the original SQLServer2000 installation. How do I do this --install into new directory? new directory and named instance? justnew named instance? What stumbling blocks could I run into?
View 2 Replies
View Related
Apr 30, 2007
Hello,
I am looking to preserve the ROWGUID column that is created automatically when a table is added to a publication as I have noticed that the column is removed and readded (with new values) each time the publication is deleted and recreated. We are planning on using the values in the rowguid column for a non-replication purpose, and don't wish the column to be removed or the values to be reset in the event the 'owning' publication is dropped for whatever reason. I've done some research and have identified the preserve_rowguidcol column of the sysmergearticles table as a candidate for achieving the desired goal. Before moving forward, I wanted to ask for input regarding this. Are there any best practices I've overlooked on this topic? Neither Google nor this forum's search results yield any real discussion on this topic.
Thanks!
DanD
View 7 Replies
View Related
May 6, 2015
I have following XQuery:
declare @xmldoc as xml
select @xmldoc = '<Text>This is firstline<Break />This is second line<Break />This is third line</Text>'
select @xmldoc.value('(/Text)[1]','varchar(max)')Result is: "This is firstlineThis is second lineThis is third line"
My problem is, that the <Break /> tags within the text are removed in the conversion to varchar. How to preserve the such tags in the varchar output? Or to get the <Break /> tags "translated" to e.g. CHAR(10)?
View 2 Replies
View Related
Dec 27, 2007
I spent huge amount of time figuring out how to preserve lading and trailing white spaces on report display without success. Can anyone help me here?
My problem is I have data with leading and or trailing white spaces and I need to show it as is. In designer preview it shows correct values. As soon as report is published and accessed on web, it truncates the whitespaces . I had a look at source, it shows values are correctly fetched(with spaces) but are ignored while rendering. I also tried replacing blank space with , however it reads this as &nbsp;.
I am using asp.net 2.0 and SQL serer 2005 reporting services.
View 4 Replies
View Related
Jun 29, 2015
I have tables and a function as representated by the code below. The names for objects here are just for representation and not the actual names of objects. Table RDTEST may have one or multiple values for RD for each PID. So the function GIVERD will return one or multiple values of RD for each value of PID passed to it.
When I run the following query, I get the required result except the rows for CID 500 for which PID is NULL in table T1. I want the rows for CID 500 as well with PID values as NULL.
SELECT A.CID,
A.ANI,
A.PID,
B.RD
FROM T1 AS A CROSS APPLY GIVERD(A.PID) B
CREATE TABLE [DBO].[RDTEST](
[PID] [INT] NULL,
[RD] [INT] NULL
)
[Code] ....
View 4 Replies
View Related
Sep 13, 2000
I am designing my first SQL database and need some insight on datatypes.
What datatype is equivalent to autonumber like in MS Access.
When I convert an auto number field to to SQL it comes as int with a length of 4, Does this mean it will only auto increment to 9999?
I need the field to increment forever.
Also what datatypes should be used for phone number with area code and
zip code.
Thanks
View 1 Replies
View Related
Nov 20, 2000
Hi i'm using the FileSystemObject to loop through a file and read out all the data within it (it's an html page, so loads of tags and free text) and then put it in a field in a table. I am using the nText datatype but i don't think i use Full-Text Searching with this, is there any other i can use that produces the same result?
Cheers in advance...
View 3 Replies
View Related
Apr 10, 2002
Hello,
I'm 17 years old and I'm from Belgium, and I have to make a school project. I have to make a program in Visual Basic and my database is SQL Server 2000. I've already made my tables but I dont know excactly what all the datatypes in SQL Server are. They are a little bit different then Access datatypes and I dont know what to use, ntext, text, nvar, ... I can't find a list of the meaning of the datatypes on the net, maybe I'm searching with the wrong keywords(+"sql server" +datatypes in yahoo), but could please someone give me a link of a site where there is that kind of information?
thanks a lot :)
Dommie x
View 1 Replies
View Related
Aug 4, 2004
I'm new to SQLServer and I'm creating some tables. In Oracle I always used varchar as this was the default and also recommended. The default in SQLServer seems to be char. Am I right in thinking that varchar is still best to use, as the field can then be of variable length rather than fixed?
View 4 Replies
View Related
Aug 27, 2005
Could someone tell me the datatypes for the SQL EXPRESS 2005
I'm trying to use a boolean datatype and it says it isn't a datatype....have they changed it??? Please HELP!!!
Thanks
View 6 Replies
View Related
Apr 1, 2007
I have a SQL 2005 database that's created by a survey data collectionsystem. Users of this system are fairly non-technical and have littleto no conscious control over the datatypes. As a result, the data ismostly stored quite inefficiently as varchars. For example, there isdata that could be stored in a column of bits and it's stored as avarchar value of 0 or 1. (Yuck, I know.)I am building a reporting system using this raw data and have a newtable structure designed that is much more efficient (and better forreporting). Does anyone have any suggestions for getting this datainto my new structure? Specifically, how would you recommend checkingthat varchar field and determining it could be stored as a bit?
View 3 Replies
View Related
Sep 29, 2006
i hope this is the right board for this.
i want to have a table for members of a club/society and i wnt to be able to maintain the structure of their member id numbers, eg com212 for a committee member, or mem019 for ordinary members.
is there a way to automate this using some sort of auto-incriment function and use this as the primary key for the table?
thanks in advance,
mark
View 4 Replies
View Related
Apr 17, 2007
I have created a coldfusion webpage form that writes to a sql database. For comment boxes they can enter as much text as they need. Do I want to choose a varchar for my datatype and put a riduculously high number for characters or should I should use a text datatype and if I use text are there specific options I should set up?
Thanks!!!
View 4 Replies
View Related
Apr 26, 2007
i have a development database that has updates and changes to a production database. rather than go through individually and alter all relevant tables and stored procedures, id like to back up the database on the development side and restore it on the production side as the production database. is there a way to restore the database on the production server but preserve all the security settings (ie logins and such)? i noticed on our development server, that if i try to restore the database with my development database, it overwrites the users and/or if the user is the same on both, it removes the login name for that user.
View 3 Replies
View Related