Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Help Oracle varchar2 - visual basic incompatibility.
Hi Guys,
I am using Visual basic interacting with Oracle. Oracle data type varchar2 needs to be defined with single quotes around them when used in a sql, but in Visual basic single quote stands for comment.
Whenever there is an occurence of character ' (single quotes) in it and when I pass this string to Oracle using Visual Basic, I get an error message.
For e.g.
Custdesc = "Let's assume' this is the name."
sSql = "UPDATE customer" sSql = sSql & " SET custdesc='" & custdesc & "'" sSql = sSql & " WHERE custId=50" Oradatabase.Executesql sSql
The only workaround I could think of is to substitute every ' with a ''. Is there a better way to do that. Say a routine. Any help is greatly appreciated.
Please email me at tkoshy_at_ix.netcom.com
Thanks
Tom Received on Sun Jan 12 1997 - 00:00:00 CST
![]() |
![]() |