Forum Discussion

smccafferty's avatar
smccafferty
Occasional Contributor
12 years ago

Adding the results of a Stored procedure to a database checkpoint (Help)

Hey guys.

I have a stored procedure on my database that returns values from a query. Cool.



I'm a rank novice as far as SQL and test complete goes, so I was wondering if there is any way to store the results from the stored proc in a database check point?



I can execute the stored proc no problem, but I aint getting anything back.



Here's the script that fires the procedure:



Sub ResetMeta__DB

  Dim cmd

  Dim sp



  sp = "myStoredProc"



  Set cmd = CreateObject("ADODB.Command")

  With cmd

      .ActiveConnection = "Provider=SQLOLEDB.1;Server=*****;Database=*****;User Id=**;Password=*****;"

      .CommandType = 4

      .CommandText = sp

      .Execute

  End With

 

  Set cmd = Nothing

End Sub



I've used the same script to revert a database using a stored proc (I know that won't return anything though). So I guess what my question is, is this:

Can a stored proc return values that can be added to a Database checkpoint in TestComplete.



Cheers guys!



Sean.
  • gid_216's avatar
    gid_216
    Frequent Contributor
    add a db table to the stores with custom query. so the db table var will store the snapshot of the result. use database checkpoint on that variable.