Create Rich Text From A Select And Save It In A Field
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?
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).
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?
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
I am trying to populate a field in a SQL table based on the valuesreturned from using substring on a text field.Example:Field Name = RecNumField Value = 024071023The 7th and 8th character of this number is the year. I am able toget those digits by saying substring(recnum,7,2) and I get '02'. Nowwhat I need to do is determine if this is >= 50 then concatenate a'19' to the front of it or if it is less that '50' concatenate a '20'.This particular example should return '2002'. Then I want to take theresult of this and populate a field called TaxYear.Any help would be greatly apprecaietd.Mark
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
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.
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
(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.
Hi All, I have a database table with a bit field. In my .aspx page I have a checkbox that is checked by default. My SqlDataSource is set up like so: InsertCommand="INSERT INTO Studies (Study_Name, Study_Status) VALUES (@StudyName, @StudyStatus)"> <InsertParameters> <asp:ControlParameter ControlID="txtStudyName" Name="StudyName" PropertyName="Text" Type="String"/> <asp:ControlParameter ControlID="chkboxStudyStatus" Name="StudyStatus" PropertyName="Text" Type="Boolean"/> I'm getting an error when inserting. Error: Cannot insert the value NULL into column 'Study_Status', table 'Studies'; column does not allow nulls. INSERT fails. The statement has been terminated.
I'm trying to save a datetime value from vb.net to a sql server.I'm using this code: Dim dt As DateTime = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss") After I save this value to Database.But on sql server management studio , I see that the field's value still has the milliseconds .
Hi, For some reason I can't use the edit, update or insert features on my remote shared server, so I am looking to create a web page that has text boxes on it, that I can enter data into, that will be saved into my database.
This is opposed to entering the data directly into the database itself. I want to be able to use a webpage, for simply adding new data, and saving it so that the new data updates and saves over the top of the old data. What are the steps involved in doing this? Any example code for just one text box would be appreciated, I could then extend it to suit my needs. Tia.
Hi I am using bcp command to export data from a table to a text file. I want to be able to save this output from bcp into log.txt how can I do that.
this is the output that I need to save it , If I run the bcp command from sql window, this output is shown in the result window, but I need to save it in a text file in c: thanks for your help
Ali
output NULL Starting copy... 1000 rows successfully bulk-copied to host-file. Total received: 1000 1000 rows successfully bulk-copied to host-file. Total received: 98000 1000 rows successfully bulk-copied to host-file. Total received: 99000 1000 rows successfully bulk-copied to host-file. Total received: 100000 NULL 100491 rows copied. Network packet size (bytes): 4096 Clock Time (ms.): total 85143 Avg 0 (1180.26 rows per sec.)
I have an SSIS package that creates a new file and saves results into that file. However, the requirement has it that I need to create this file on a server residing in a different domain. How can I achieve this in an SSIS package when it is scheduled as a job?
hi all i have a database in sql server 2000 and vb.net forms when i send arabic data through forms, they save to database as ?????? i had create my database with arabic collation and save my forms with unicode but that problem exists any help ? imergency help is needed ! thank u
you see these are the requirements.. 1. there is a text file named "Loan" 2. i must create a program using ASP.net wherein the text file can be imported in the system. 3. after importing, i must save the whole text file in a database.
my questions are:
1. what code can i do to open up a text file? 2. how can i save the text file into a database? 3. is there any way that i could import the file and view its content in my application? 4. after viewing, how can i save the text file as a text file in a database?
Hi, Recently, I started to move more databases from SQL Server 2000 to 2005, well the Stored Procedures in 2005 is hard to handle.
First of all, I created the new SP in Object Explorer, the "New Stored Procedure" query just created a new name under the Stored Procedures folder, then I have to re-open it to put in TSQL code.
After I put in the code in the new SP, if I click "Save", the File Manager comes out to let me to save in a physical location (C: or D: or Network place...). But after I close and open the new SP, the code I put in there is not really in the new SP.
I know that I have to "Execute" the SP in order to save the change. But the problem is I don't want to run the code at this step, the SP is to get a lot of data transactions, I'll setup a "Job" to do this.
So, the question is: Is this the way to create and save a new SP? Is there any other way to save the code changes in the SP WITHOUT "Execute" it?
Please give me any advise, article or links to read.
Im a programmer for an university webportal which uses php and msssql. When an user creates a new entry and his text is too long the entry is cut short and weird characters appear at the end of the entry.
For example: http://www.ttz.uni-magdeburg.de/scripts/test-messedb/php/index.php?option=show_presse&funktion=presse_show_mitteilung&id=333
How can I set the text limit to unlimited? Could it be something else? Is there a way of splitting an entry to several text fields automatically?
Thanks in advance for any help you can give me, Chris
In SQL 2012, this fails with the error message, cannot find the text qualifer for field.
To get around this, we are having to import the data into a Dirty Data column of aTEMP table, ID, Dirty Data, Clean data - perform multiple updates and change the text qualifier and ensure they are only changed in the right places so we can keep the ". In this example, we changed the text qualifier to PIPES.
After these updates, we then export the data from CLEAN data back out to CSV, then reimport it into the origional destination table with a new text qualifer.
I have a column in a table that has a type TEXT,when I pull the length of a row it returns 88222 but when I select from that column it dows not show all the text in the result set.
I have to access a web service where I pass in a product number and it produces an XML result with an /image section where it has a long string (base64?) I am trying to call the web service and save the image to the OS.
I am trying to get the result into a variable and save it to disk with the itemno.jpg as the name
This is a sample file I get back..
<NewDataSet> <Table> <ITEMNO>2065</ITEMNO> <Image>/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNr ... removed since too long for post ...</Image> <ImageDate>2015-04-15T00:00:00+00:00</ImageDate> </Table> </NewDataSet>