Forum Discussion

Jeth01's avatar
Jeth01
New Contributor
9 years ago

Data connection not returning rows, but the log/UI says it does

I am having a problem with my data connections. I have them all configured correctly, and they pass the connection test. When I run the query, the UI shows "Got 2 rows in 187ms", but no data is returned. This is causing all my testSuites to fail, because they are sending requests with empty data. 

See the attached screenshot. The status bar says that 2 rows were returned, but there is no data shown in the data log. The query does return 2 rows of data. This is happening for both of my data connections.

 

DataConnection.JPG

3 Replies

  • GCushman's avatar
    GCushman
    Occasional Contributor

    Any update on this issue?  I am running into the same problem.  If I go into the Query Builder and run it, the 'Result Preview' window displays my data.  But when I run it from the Data Source window, I see same behavior as noted in original post.

     

    This is not cosmetic issue.  I cannot use this data in property expansions in a script assertion because all fields are evaluating to empty string ("").  If I change my Data Source to a flat file, my script assertions work as expected.

     

    I am using Ready API! 1.3.1

    My JDBC driver from my data source is:

    com.microsoft.sqlserver.jdbc.SQLServerDriver

     

    Any help/suggestions greatly appreciated as I really prefer to use SQL as my source over text file.

     

    Thanks,

    Greg

     

    • GCushman's avatar
      GCushman
      Occasional Contributor

      Found the problem.  The property names that are automatically created when creating the DataSource ("Affect properties" checkbox is checked) are prefixed with database, schema and tablename.  Renaming the properties to match my field names fixed my problem.

       

      The irony is that I has just completed the online training and specifically remembered the instruction to make sure "affect properties" is checked so you don't have to go through pain of creating fields.  It is still painful to have to rename them all.

      • Jeth01's avatar
        Jeth01
        New Contributor

        That did not work for me. I do not use query builder, I just type in SQL in the window. But I went into query builder and tried checking that box, and also unchecking it. Neither one fixed the problem. No matter what I have for my property name, I still do not see the values in the data grid. My SQL statement is "select foh.customer_number as cust_num..." so I tried setting the property to foh.customer_number and cust_num, and something totally different. None of those worked. 

         

        Anyway, thanks for posting that, glad it worked for you.