Re: replace
From: Roland Hall (nobody_at_nowhere)
Date: 09/07/04
- Next message: Inamori Izumi: "problem"
- Previous message: Marcelo: "Passing through a var"
- In reply to: Shawn: "replace"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 6 Sep 2004 21:01:51 -0500
"Shawn" wrote in message news:eRyPMKElEHA.1936@TK2MSFTNGP12.phx.gbl...
: I have a form with a couple of text fields where users can enter some
data.
: The data is stored in an access DB.
: the problem is that whenever a user enters " in a textbox some of the text
: dissapears.
: Example:
: If the users writes: I have a 17" LCD for sale
: Then this is what is stored in the DB: I have a 17
:
: How can I store the whole text in my DB? Or how can I remove it
altogether?
: I've tried Replace(myString, chr(34), "-") but that didn't work.
What exactly does "that didn't work" mean?
You have a logical OR request but then gave a negative result response.
If you want to replace a double quote with a hyphen, then replace(myString,
chr(34), "-") should work. This should also work: replace(myString, """,
"-"). However, not being able to see your code leaves us with the
probability you made an error in your coding.
if myString = I have a 17" LCD for sale
then this:
myString = replace(myString, """, "-")
would result in myString having a value of:
I have a 17- LCD for sale
Perhaps showing relevant code might reveal the error?!
-- Roland Hall /* This information is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. */ Technet Script Center - http://www.microsoft.com/technet/scriptcenter/ WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp MSDN Library - http://msdn.microsoft.com/library/default.asp
- Next message: Inamori Izumi: "problem"
- Previous message: Marcelo: "Passing through a var"
- In reply to: Shawn: "replace"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|