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?

Best Regards,
Manolis Perrakis

View 1 Replies


ADVERTISEMENT

Rich Text Field

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

Removing Rich Text Formatting From A Field

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

Rich Text Support

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

Create Date Field From Substring Of Text Field

Jul 20, 2005

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

View 2 Replies View Related

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 View Related

Storing Rich Text In A Database

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

Storing Rich Text Information.

Sep 5, 2002

View 2 Replies View Related

Rich TextBox With Picture And Text

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

Very Long Rich Text Information - Datatype?

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

ActiveX Control For Converting Rich Text To HTML

Feb 24, 2003

Does anyone know where I can find a freeware Rich Text to HTML ActiveX Control?

View 1 Replies View Related

SSRS Newbie - How To Display Rich Text In A Report

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

Reporting Services :: Select Text Field Dataset Based On User Select Option?

Aug 4, 2015

I have a report that uses different datasets based on the year selected by a user.

I have a year_id parameter that sets a report variable named dataset_chosen. I have varified that these are working correctly together.

I have attempted populating table cell data to display from the chosen dataset. As yet to no avail.

How could I display data from the dataset a user selects via the year_id options?

View 4 Replies View Related

Using Checkbox To Save To Bit Field

Jan 30, 2008

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.

View 2 Replies View Related

Save SQL XML Field Type To A Xml File

Jul 14, 2007

Hi, I have a table which holds raw xml in a field with type XML. How do I export that XML field to an XML file? Thanks Bones 

View 6 Replies View Related

How To Save To Datetime Field Without Milliseconds

Jul 4, 2015

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 .

View 14 Replies View Related

Save Only The Date In A Datetime Field

Feb 28, 2007

Hello. A question please. Can I save only the date in a datetime field ? I don't want the hours.

View 16 Replies View Related

Transact SQL :: Return Field When A Field Contains Text From Another Field

Aug 25, 2015

I'm new to SQL and I'm trying to write a statement to satisfy the following:

If [Field1] contains text from [Field2] then return [Field3] as [Field4].

I had two tables where there were no matching keys. I did a cross apply and am now trying to parse out the description to build the key.

View 8 Replies View Related

How To Save Contents Of Text Box To Database?

May 6, 2006

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.

View 2 Replies View Related

Save Result To A Text File

Nov 14, 2007

Want to save the result of a query in sql server express to a text file or any other file.

anujahanvi

View 1 Replies View Related

Save And Retrieve RTF TEXT FROM SQL DATABASE

Jul 18, 2007

Hi,
i have a richtextbox control in my application, and want to know how to save and retrieve formatted text in a MS SQL DB.

I found this example in the forum, but I don't know how to use it. Can you please help me solve the problem? Where should I write the code below?





I've just tried it and able to do this successfully.

I basically did this:
load the RTF into the RTB control
created a SQL command, simple basic insert statement:











SqlCommand theSQLCommand = new SqlCommand("INSERT INTO [TableName] (Field) VALUES (@p1)");
SqlParameter theSQLParameter = new SqlParameter("@p1", SqlDbType.Text);
theSQLParameter.Value = this.theRichTextBox.RTF;
theSQLCommand.Parameters.Add(theSQLParameter);
theSQLCommand.Connection = new SqlConnection(ConnectionString);
theSQLCommand.Connection.Open();
theSQLCommand.ExecuteNonQuery();
theSQLCommand.Connection.Close();





then to retrieve it, I did this, again, specifically for this example











this.theRichTextBox.Text = String.Empty;
SqlCommand theSQLCommand = new SqlCommand("SELECT [Field] FROM [TableName] WHERE [ID] = 1");
theSQLCommand.Connection = new SqlConnection(ConnectionString);
theSQLCommand.Connection.Open();
SqlDataReader theReader = theSQLCommand.ExecuteReader(CommandBehavior.CloseConnection);
while (theReader.Read())
{
this.theRichTextBox.RTF = theReader.GetValue(0).ToString();
}
theSQLCommand.Connection.Close();





And was able to do this fine and got all the formatting etc... correctly.

View 1 Replies View Related

How To Create , Save DTS In SQL 2005

May 30, 2007

Can anyone tell me what all steps in creating DTS package , how it saves,

how it re executes... what all steps ... and how it makes??





Thanks

Aravind

View 1 Replies View Related

Save The Bcp Output In A Text File To Check It Later

Jan 27, 2000

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.)

(106 row(s) affected)

View 2 Replies View Related

Save Query Results Into Text Or CSV File

Apr 19, 2013

I found this topic from this link: Save MySQL query results into a text or CSV file | a Tech-Recipes Tutorial

I am try to create the text file from query results but it didn't work and got this error: "Incorrect syntax near the keyword 'INTO'.

SELECT sale, del
FROM order
INTO OUTFILE 'C:/tmp/orders.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '
'

View 10 Replies View Related

How To Create Or Save Files In A Different Domain

May 16, 2007

Hey,

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?

Thanks,

Aravind

View 3 Replies View Related

CREATE, ALTER, Why Wont It Save?

May 11, 2007



when i create a new stored proc, i say "CREATE PROCEDURE [sprocName]"

but the next time i edit the stored proc, it hasnt changed to "ALTER ..."

I manually change it to ALTER, and run it, and close it, and it reverts back to "CREATE..."



Is there some sort of privelage i have to enable? Has anyone encountered this before?



Help guys, please :-S



Also, if you know of a better place where i can post this thread, please let me know

View 3 Replies View Related

How Can I Save Arabic Text Instead Of ???? To Sql Server 2000 Tables?

Dec 12, 2005

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

View 3 Replies View Related

How Can I Open And Save A Text File To A SQL Database Using A. ASP.net W/ C# Application

Jan 24, 2008

Hi guys..

i'm having a hard time to do this one..

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?

thanks to the help

View 17 Replies View Related

Stored Procedure Is Hard To Create/Save

Jun 19, 2008

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.

Thanks.

View 6 Replies View Related

Problem With Text Field: Text Input Too Long, Weird Characters

May 15, 2006

Hi,

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

View 3 Replies View Related

SQL 2012 :: Text Qualifier Inside A Text Qualified Field

Mar 12, 2015

In SQL 2005 if i was trying to insert some data with a text qualifier inside a text qualified field, it would work, for example:

"Name","ID ","Location","","Comany",""House Name" Road",

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.

View 5 Replies View Related

Transact SQL :: Server Text Field Not Returning Full Text

Apr 21, 2015

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.

View 3 Replies View Related

Integration Services :: Web Service Has Image Field - How To Save To Disk

Jun 5, 2015

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>

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved