once again I am explaing my question is
I am send string test"A" to database,
but I am getting string test that all.
> > I have a string like this ( test " A " ) and want to insert into the
> > database as same ( test " A " )
>
> And the problem is?
Oliver Wong - 21 Aug 2006 16:47 GMT
[post re-ordered]
>> > I have a string like this ( test " A " ) and want to insert into the
>> > database as same ( test " A " )
[quoted text clipped - 5 lines]
> I am send string test"A" to database,
> but I am getting string test that all.
A question usually has a question mark ('?') at the end.
Your database... does it use SQL? If so, what's the SQL statement you're
using to perform the insert? If not, what kind of database are you using?
- Oliver
usman - 21 Aug 2006 17:00 GMT
I am using oracle as my database
string which I am setting the database as follows
cstmt.setString(2,mcNumber);
mcNumber is a string variable and it is getting the string as test"A"
but the database is taking test as a complete not test"A"
my problem is that string before the double quote is getting inserted
and reamining is not getting inserted into the database
> [post re-ordered]
>
[quoted text clipped - 14 lines]
>
> - Oliver
Oliver Wong - 21 Aug 2006 19:26 GMT
>I am using oracle as my database
>
[quoted text clipped - 7 lines]
> my problem is that string before the double quote is getting inserted
> and reamining is not getting inserted into the database
What's the class of cstmt?
- Oliver
Luke Webber - 22 Aug 2006 01:35 GMT
>> I am using oracle as my database
>>
[quoted text clipped - 9 lines]
>
> What's the class of cstmt?
...and are you /certain/ your string is correct when you get to the
setString logic? Have you tried displaying the contents to be certain?
Luke
Moiristo - 21 Aug 2006 16:48 GMT
> once again I am explaing my question is
>
> I am send string test"A" to database,
> but I am getting string test that all.
Is this a java question? Usually, you need to escape quotes using a
backslash ( test\"A\" ), but it may be the case that you need to double
escape it.