Mailingliste - Einträge 2006

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [qftestJUI] qfstest variable in SQL statement zxJDBC

  • Subject: Re: [qftestJUI] qfstest variable in SQL statement zxJDBC
  • From: Gregor Schmid <Gregor.Schmid@?.de>
  • Date: 29 Oct 2006 20:41:01 +0100

Hi David,

first, you should always use rc.lookup("...") instead of $(...) inside
scripts unless you're 100% sure the variable's value is a number or
boolean (which might be the case for userID).

An alternative cause of the problem is that you may need to quote the
value of userID for the SELECT statement if it is a string, not a

So please try:

cursor.execute("SELECT jdoidx FROM mpm_user_options WHERE useridx = '%s'" % rc.lookup("userID"))

If that doesn't work I'll need a run-log with both the failure and the
working version with the "actual user id" you mentioned.

Best regards,

David_Downey@?.com writes:

>    I am trying to pass a qfstest local variable into an SQL statement.  I
>    can't seem to get it to accept the value.
>    cursor.execute("SELECT jdoidx FROM mpm_user_options WHERE useridx =
>    $(userID)")
>    Jython doesn't see the variable as a value.  It seems to take it
>    literally.  When I use the actual user id it works otherwise it
>    doesn't.
>    ERROR:
>    Traceback (innermost last):
>      File "<console>", line 1, in ?
>    Error: ORA-00911: invalid character
>    David A. Downey
>    Software Quality Assurance Analyst
>    BD Technologies
>      _________________________________________________________________
>    **************************************************
>    constitute an advertisement of BD group's products or services or a
>    solicitation of interest in them. If this is such a message and
>    you would like to opt out of receiving future advertisements or
>    solicitations from this BD group, please forward this e-mail to the
>    optoutbygroup@?.com.
>    **************************************************
>    This message (which includes any attachments) is intended only for
>    the designated recipient(s). It may contain confidential or
>    proprietary information and may be subject to attorney-client
>    privilege or other confidentiality protections. If you are not a
>    designated recipient, you may not review, use, copy or distribute
>    this message. If you received this in error, please notify the
>    sender by reply e-mail and delete this message. Thank You
>    **************************************************
>    Corporate Headquarters Mailing Address: BD (Becton, Dickinson and
>    Company) 1 Becton Drive Franklin Lakes, NJ 07417 U.S.A.
> _______________________________________________
> qftestJUI-list mailing list
> qftestJUI-list@?.de

Gregor Schmid                                Gregor.Schmid@?.de
Quality First Software GmbH           
Tulpenstr. 41                                Tel: +49 8171 919870
DE-82538 Geretsried                          Fax: +49 8171 919876