Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / February 2007

Tip: Looking for answers? Try searching our database.

Rich text from sql database

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David Barrett - 14 Feb 2007 11:44 GMT
Hi,

I'm developing using InfoPath 2007 in Visual Studio 2005 (c#). I'm trying to
save the contents of a form's rich text box to an SQL Server 2005 database.
I've managed this by saving the rich text box's xml to a text field.

Now I want to retrive that xml from the text field in my sql database and
display it in my infopath form. At the moment I can only get the xml to
display using:

nav.SelectSingleNode("/my:myFields/my:fldRichText",
this.NamespaceManager).SetValue(Convert.ToString(thisReader["fldFormRichText"]));

How can I get the rich text xml translated into rich text and displayed on
my form.

Any help would be greatly appreciated.
Thanks
S.Y.M. Wong-A-Ton - 15 Feb 2007 06:13 GMT
When saving to the database, retrieve the contents of the Rich Text Box using
the InnerXml property of the field. When retrieving from the database, set
the InnerXml property of the field instead of using the SetValue method of
the field.
---
S.Y.M. Wong-A-Ton

> Hi,
>
[quoted text clipped - 14 lines]
> Any help would be greatly appreciated.
> Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.