This is a migrated thread and some comments may be shown as answers.

Save content in an Oracle Database with webservice

3 Answers 176 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Joerg
Top achievements
Rank 1
Joerg asked on 14 Nov 2011, 02:57 PM
I want to use the Richtextbox in a Silverlight application with an Oracle database behind it. The content of the box should be stored by the user after a button click in a BLOB/CLOB field of an Oracle database with a  WPF webservice. Does anybody know if this is possible or perhaps experience with the topic? Any help is appreciated.

3 Answers, 1 is accepted

Sort by
0
Boby
Telerik team
answered on 17 Nov 2011, 11:25 AM
Hello Joerg,
You can get and set the content of a RadRichTextBox's document using the available format providers. There are also data providers which are used to bind the rich text box to strings in a specific format.
When it comes to persisting the documents on the server, you can find two examples (one using XamlDataProvider and one working with DocxFormatProvider) in this forum post. The approach with an Oracle database and the Clob type should be quite similar.

Let us know if you have other questions.

Greetings,
Boby
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Joerg
Top achievements
Rank 1
answered on 21 Nov 2011, 11:02 AM
But my problem still is that for example the XAMLDataprovider returns a string, but when I want to insert a datarow in the Oracle Database a blob field is required. With C# I use the byte[] datatype to save in the Oracle database. But how can I convert the string (from the XAML Dataprovider) into a byte[] i.e. blob parameter? Does any example code exists? I suppose that this is daily routine in business application. But so far I cannot find an example....
0
Alex
Telerik team
answered on 24 Nov 2011, 02:38 PM
Hi Joerg,

Converting string to byte array and vice versa is fairly easy to do in C#.  You can find how its done here
I hope this was helpful.

All the best,
Alex
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
RichTextBox
Asked by
Joerg
Top achievements
Rank 1
Answers by
Boby
Telerik team
Joerg
Top achievements
Rank 1
Alex
Telerik team
Share this question
or