Forum Discussion

st-pat's avatar
st-pat
Occasional Contributor
7 years ago
Solved

0 down vote favorite I have a problem which I don't quite seem to get and therefore not sure about

Hi everyone,
 

I have a problem which I don't quite seem to get and therefore not sure about any solutions. I have in Soap UI a Data source that gets it's values from an excel sheet, now I try to check some of the data that has been manipulated via a CRM software and query the database with the DS values that looks like:

select * from payment where customer = :cid and payment_source = :bank

that select stays empty, but when I hardcode the last value select * from payment where customer = :cid and payment_source = 'FIRSTNAT' the data gets returned, so I assume that the JDBC doesn't know that the last value is a string. Is there any (easy) way to like tell jdbc or soap that that last thing is a string? I've read across forums and there's some toString()functions and some mentions of groovy scripts, but I'm totally blank in these corners of soap.

 

best wishes

Pat

  • Use Property Expansions

     

    select *
    from payment 
    where customer = '${#DataSource#cid}'
    and payment_source = '${#DataSource#bank}'

4 Replies

  • JHunt's avatar
    JHunt
    Community Hero

    Use Property Expansions

     

    select *
    from payment 
    where customer = '${#DataSource#cid}'
    and payment_source = '${#DataSource#bank}'
    • st-pat's avatar
      st-pat
      Occasional Contributor

      thnx, the property expansion worked, not quite what I planned but at least a "workaround"

  • nmrao's avatar
    nmrao
    Champion Level 3
    Would you like to show a screen shot of the same?
    Are you using JDBC test step?
    Do you get any errors?
    • st-pat's avatar
      st-pat
      Occasional Contributor

      hi,
      It's a teststep yes I have a lot of other DB queries in other parts only this one makes troubles somehow.
      Here's the two windows one with the property hardcoded, and transferred .