You have to excape them.  ie.

String str = "\"blah\", \"blah\"";

--- Margaret Fisk <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> I've got a basic question about quotation marks that
> I can't figure out.
>
> I'm trying to pass an array as a string argument to
> an SQL query.
>
> I have an array that identifies a user and their
> associated area, both by
> Strings as the identifier.
>
> I need to end up with a String that contains all the
> associated areas in
> double quotes, separated by commas.
>
> i.e.
>
> Array
>         0               1
>         User1   homework
>         User2   Gym
>         User3   Math
>         User1 Science
>         User2   English
>         User1   Chess Club
>
> Using a for loop, I collect all the array[1] values
> associated with User1
> and put them into a string
>
> areas=areas+',"'array[i][1];
>
> What I need is "homework","Science","Chess Club" to
> be used in an in
> statement for the sql query.
>
> I tried to use single quotes to prompt Java to
> ignore the double quote
> character (it works in Perl) but it still gives me
> compilation errors.
>
> Does someone have an approach that works?
>
> Thanks,
> Margaret
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED]
> and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives:
>
http://archives.java.sun.com/archives/servlet-interest.html
> Resources:
>
http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help:
http://www.lsoft.com/manuals/user/user.html


=====
Mike Shoemaker
[EMAIL PROTECTED]
GO BLUES!
Visit my website
http://www.PavolDemitra.com

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year!  http://personal.mail.yahoo.com/

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to