Hi,
Can someone explain to me why it isn't possible to add strings after the rtf
property of a RichEditBox? For example, I am trying to create an SQL string
as
follows:
Dim sSQL As String = "UPDATE tblRecipe SET Preparation='" &
txtPreparation.Rtf & "' WHERE Id=35"
For some reason, the text after the Rtf property is not added to the string
sSQL. What is it I am doing wrong? Is there another way I can build this
query?
Thanks in advance,
Sandra 8 2941
Hi,
Use txtPreparation.Text instead.
Ken
-----------------
"Sandra Setz" <ss*************@wxs.nl> wrote in message
news:bt**********@reader08.wxs.nl... Hi,
Can someone explain to me why it isn't possible to add strings after the rtf property of a RichEditBox? For example, I am trying to create an SQL string as follows:
Dim sSQL As String = "UPDATE tblRecipe SET Preparation='" & txtPreparation.Rtf & "' WHERE Id=35"
For some reason, the text after the Rtf property is not added to the string sSQL. What is it I am doing wrong? Is there another way I can build this query?
Thanks in advance, Sandra
* "Sandra Setz" <ss*************@wxs.nl> scripsit: Can someone explain to me why it isn't possible to add strings after the rtf property of a RichEditBox? For example, I am trying to create an SQL string as follows:
Dim sSQL As String = "UPDATE tblRecipe SET Preparation='" & txtPreparation.Rtf & "' WHERE Id=35"
Are you sure you are not looking for the 'Text' property?
For some reason, the text after the Rtf property is not added to the string sSQL. What is it I am doing wrong? Is there another way I can build this query?
Maybe the string contained in the 'Rtf' property ends with a null
character. When appending the text, the IDE and/or message box and/or
some controls won't show the whole string because they think it ends at
the null character.
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
> > Can someone explain to me why it isn't possible to add strings after the
rtf property of a RichEditBox? For example, I am trying to create an SQL
string as follows:
Dim sSQL As String = "UPDATE tblRecipe SET Preparation='" & txtPreparation.Rtf & "' WHERE Id=35" Are you sure you are not looking for the 'Text' property?
No, since I want to save the rtf-format into the database as well, so I need
the rtf property.
Maybe the string contained in the 'Rtf' property ends with a null character. When appending the text, the IDE and/or message box and/or some controls won't show the whole string because they think it ends at the null character.
Mmm, how do I check this?
Sandra
> Use txtPreparation.Text instead.
But then I don't save the rtf-formatting, and that's what I want.
Sandra
* "Sandra Setz" <ss*************@wxs.nl> scripsit: Maybe the string contained in the 'Rtf' property ends with a null character. When appending the text, the IDE and/or message box and/or some controls won't show the whole string because they think it ends at the null character.
Mmm, how do I check this?
You can use 'InStr' or the string's 'IndexOf' method to search for
'ControlChars.NullChar'. If it's part of the string, you can use 'Mid'
or the string's 'Substring' method to get the part of the string without
the null character. After getting rid of this character (if it is part
of the string), concatenate the other string to the end.
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
> You can use 'InStr' or the string's 'IndexOf' method to search for 'ControlChars.NullChar'. If it's part of the string, you can use 'Mid' or the string's 'Substring' method to get the part of the string without the null character. After getting rid of this character (if it is part of the string), concatenate the other string to the end.
Yeah, this was the problem. Thanks. It seems to work now.
Sandra
* "Sandra Setz" <ss*************@wxs.nl> scripsit: You can use 'InStr' or the string's 'IndexOf' method to search for 'ControlChars.NullChar'. If it's part of the string, you can use 'Mid' [...] Yeah, this was the problem. Thanks. It seems to work now.
Thanks for confirming that!
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl... * "Sandra Setz" <ss*************@wxs.nl> scripsit: You can use 'InStr' or the string's 'IndexOf' method to search for 'ControlChars.NullChar'. If it's part of the string, you can use 'Mid'
[...] Yeah, this was the problem. Thanks. It seems to work now.
Thanks for confirming that!
You're welcome ;-)
Sandra This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Mike |
last post by:
Hello,
I would like to write a string-like class that will only allow certain
string values, (for example, specified with a regular expression). I'd
still like it to behave like a string, I...
|
by: Noulouk |
last post by:
Hi ,
I need a string which is the path of a property in my class.
For example, my property path is :
MyNamespace1.Drawing.Class1.Property1 (found with intellisense) --> I
need to put this to a...
|
by: rsine |
last post by:
I have developed a program that sends a command through the serial port
to our business system and then reads from the buffer looking for a
number. Everything worked great on my WinXP system, but...
|
by: JohnR |
last post by:
I have a user defined class that contains about 20 private variables with
their associated properties and get-sets. I have named the properties with
very user readable names. I would like to...
|
by: Philip Wagenaar |
last post by:
I created a Mustinherit class with two must override readonly properties:
Public MustInherit Class RequestPart
Public MustOverride ReadOnly Property Description() As Boolean
Public MustOverride...
|
by: Udi |
last post by:
Hi,
How do I make sure that any character that is typed into my RichEditBox
will be appanded to the Text?
(I'm using the RichEdit as a console window. I'd like to allow the user
selecting any...
|
by: FAQ server |
last post by:
-----------------------------------------------------------------------
FAQ Topic - How do I access a property of an object using a string?...
|
by: Donn Ingle |
last post by:
Hi, I really hope someone can help me -- I'm stuck.
I have written three versions of code over a week and still can't get past
this problem, it's blocking my path to getting other code written.
...
|
by: chrisbarber1 |
last post by:
Can anyone help??
How can i get the string representation of a property?
For example if I have a Client object that has a FirstName property,
how in code can I get "FirstName" from...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |