Hi, I've got the same problem and I'm very interested in seeing your test plan. Coul you send me it?
Mark Aronszajn wrote: > > Thanks Deepak, I'm still unsure as to the scope of these variables, but > I did get the example working. YOu don't need to use a ForEach > controller. The example I was working on--using the variable in a query > of a subsequent JDBC Request--only because of silly mistakes on my part. > > If anyone is interested in seeing a sample test plan that makes use of > this feature. I'd be happy to send it along to any inquiries. > > Mark > > -----Original Message----- > From: Deepak Shetty [mailto:[email protected]] > Sent: Sunday, January 10, 2010 5:49 PM > To: JMeter Users List > Subject: Re: Scope & usage of variables introduced in JDBC Request > Sampler > > The scope should be the same as any other variable i.e. it is available > once set. > >>If, for example, I have two JDBC Request samplers in a given Thread >>Group, can I use a variable introduced in the first of the two JDBC >>samplers in specifying the query I want to issue in the 2nd of the two >>JDBC samplers? > Yes. it should work. Put a debug sampler after the first JDBC sampler > and verify the variables that got set. > > I havent tried it , so the below is a guess I think You should see > varName1_1, varName1_2 etc as multiple values would have got set. > You'd probably need a ForEach controller that iterates over varName and > returns into say x and use ${x} in your query. > > > regards > deepak > > On Sun, Jan 10, 2010 at 5:36 PM, Mark Aronszajn < > [email protected]> wrote: > >> I appreciate the introduction of assignable variables to handle values > >> returned in result sets within JDBC Request Samplers. >> >> I also appreciate the later addition of documentation on how to >> introduce the variable names in the Variables field at the bottom of >> the JDBC Sampler dialogue. >> >> But it would be very helpful to include documentation on actual usage >> of such variables and also specification of the scope of those >> variables once introduced. If, for example, I have two JDBC Request >> samplers in a given Thread Group, can I use a variable introduced in >> the first of the two JDBC samplers in specifying the query I want to >> issue in the 2nd of the two JDBC samplers? >> >> An example of usage of such a variable would probably be sufficient. I > >> tried just what I described above and it didn't work, perhaps because >> of the scope or perhaps for some other reason. I can't tell. >> >> I'd certainly appreciate any help on this issue in responses to this >> email. >> >> Thanks in advance, >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > -- View this message in context: http://old.nabble.com/Scope---usage-of-variables-introduced-in-JDBC-Request-Sampler-tp27104749p28240675.html Sent from the JMeter - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

