Home » RDBMS Server » Server Administration » Please Help Me!!
Please Help Me!! [message #373224] Wed, 04 April 2001 23:12 Go to next message
Woung Hang
Messages: 2
Registered: April 2001
Junior Member
I want to insert a string like "I'am good" into Oralce database from ASP.NET page.
I tried this method:
Replay(string,"'","''")
But it did'nt work!!

Please help me !!!
Thank u very much!!
Re: Please Help Me!! [message #373246 is a reply to message #373224] Thu, 05 April 2001 19:16 Go to previous messageGo to next message
kavithask
Messages: 34
Registered: March 2001
Location: London
Member
Hi,

Instead of using 2 quotes in front of a quote, use the CHR function. Find the ascii value of the quote and concatenate it with the string. This should work.

HTH
Kavitha
Re: Please Help Me!! [message #373247 is a reply to message #373224] Thu, 05 April 2001 21:43 Go to previous messageGo to next message
Woung Hang
Messages: 2
Registered: April 2001
Junior Member
Hi Kavitha,

I tried:
Replace(str,chr(39),"''")
and
Replace(str,"'",chr(39))
and
Replace(str,chr(39),chr(39)chr(39))

But I did'nt get result.

Please help me again!
Thank u very much!!
Re: Please Help Me!! [message #373250 is a reply to message #373247] Fri, 06 April 2001 03:54 Go to previous message
kavithask
Messages: 34
Registered: March 2001
Location: London
Member
Hi,

When you execute ur insert statement, it should be:

insert into tablea
('I' || CHR(39) ||' am Good');

Can you convert this into your ASP.NET code?

HTH
Kavitha
Previous Topic: Data is duplicated in the table when uploading to the SQL server ( Help?)
Next Topic: Problem with Outer Joins
Goto Forum:
  


Current Time: Sat Jun 29 00:55:09 CDT 2024