|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Hi,
I have one field uname in oracle db with varchar2 datatype.iam trying to insert a value like srividya's into that uname field from my asp form page.but iam getting the error.. the insert statement that iam using in asp page is, ----------------------------- set conn=server.createobject("adodb.connection") conn.open "dsn=sss;uid=ss;pwd=ss" set rs= conn.execute("insert into xxx values('"&username&"')") --------------------------- (where username is the variable name having srividya's has its value) so, please tell me how to insert a quoted string value into the database. |
|
#2
|
|||
|
|||
|
Just use the other kind of quotes as your delimiters.
So, if there are 1 or more single quotes in your string, use double quotes to enclose the value. If there are 1 or more double quotes, use single quotes to enclose the value. If there's both in your string...well then your going to have to ask someone else. But the above methods should work Hope that helps
__________________
- dsb - ![]() Perl Guy |
|
#3
|
|||
|
|||
|
hi dsb,
thanks and i'll try that. Quote:
|
![]() |
| Viewing: Dev Shed Forums > Other > Beginner Programming > inserting a string having quotes into the oracle db |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|