Forum Discussion

JamieBrydges's avatar
JamieBrydges
New Contributor
9 years ago

How do i return a table from a sql server query using Testcomplete?

Hi, i'm trying to return a table from a sql server query.  I have the folowing method but when i look at the results that are return i get the error = error: cannot perfom this operation on a closed...
  • Colin_McCrae's avatar
    Colin_McCrae
    9 years ago

    The key here is you're writing out all your returned results BEFORE closing the connection. (I drop them into an array rather than the log, but same thing.)

     

    Same deal.

     

    (I use both - query & execute. Mostly query. But I have to use execute to get back number of affected rows for some calls. It's not requrned as a parameter of a RecordSet object for a standard query. Which is annoying.)