Variable/function substitution is simple textual substitution, so if
you want to replace the string test in the following:

select from table where col = 'test'

you need to use

select from table where col = '${Var}'

i.e. the quotes are still needed 
- unless you set the variable Var to include the enclosing quotes.

Could this be your problem?

==

To display the value of a variable you can add a JavaTest Sampler, and
include the value in one of its fields - e.g. the Label - which will
then show up in the Listeners.

Or you can wrap the variable/function reference in ${__log()}, for example

   ${__log(${Counter})}

which will print the value to the jmeter.log file. 
The return value of the __log() function is its first parameter so the
enclosing text is unaffected.

Note: a variable/function that is not recognised is not logged - it is
just left as is - so if you are expecting to see 1234 and you see
${Counter} that's because Counter is not recognised as a variable.


S.
On Fri, 11 Mar 2005 21:08:08 -0500, Peter Lin <[EMAIL PROTECTED]> wrote:
> that's what I was guessing. is username read from a previous query or
> some place else?
> 
> peter
> 
> On Fri, 11 Mar 2005 21:02:32 -0500, Mike Buzzetti
> <[EMAIL PROTECTED]> wrote:
> > Gino, I played around with your test plan, and I could not get it to
> > work with the newest nightly build. Basically the error is that
> > ${Username} is not getting changed to the value of the username.
> >
> > I don't know why, but I believe that is the problem. ( I am not 100%
> > positive since I only looked at it for about an hour)
> >
> > anyone have any ideas?
> >
> >
> > On Fri, 11 Mar 2005 14:29:13 -0600, Craig S. Wilson <[EMAIL PROTECTED]> 
> > wrote:
> > > Gino Gargiulo wrote:
> > > > The sql is fine, I sent in the same request replacing the ${Username}
> > > > with a value 'test' and the statement ran fine.
> > > >
> > > > Are there any samples of this where it is working?
> > >
> > > I have user variables and property variables in JDBC SQL statements.
> > >
> > > Examples of the SQL I use:
> > >
> > > delete from job where job.id = media_title.id and media_title.account_id
> > >  >= ${__property(deleteaccountjdbc.accountnamestart)};
> > >
> > > select job_status_id from job where media_title_id = ${mtid};
> > >
> > > Usually, when an SQL operation fails for me it is because I have some
> > > syntax error.
> > >
> > > --
> > >
> > > ---------------------------------------
> > > Craig S. Wilson     [EMAIL PROTECTED]
> > > WaveFront Communications, Inc.
> > > 1677 Lake Valentine Road
> > > Arden Hills  MN  55112-2840
> > > 1.651.638.9594     1.612.865.8794
> > > ===============================
> > > Note:  If you send me HTML-mail, it will
> > >            probably end up in my SPAM bucket.
> > > ---------------------------------------
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to