Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 130161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T05:54:15+00:00 2026-05-11T05:54:15+00:00

I have a database checkpoint in QTP (HP QuickTest Pro); this checkpoint works if

  • 0

I have a database checkpoint in QTP (HP QuickTest Pro); this checkpoint works if I pass it a static query, but I need to be able to pass in parameters or build the query programatically. I also know how to query the database programatically from QTP, but don’t see a way to create a checkpoint based on its results.

Specifically, I want to cause a FAIL if the returned RecordCount = 0, and PASS if >= 1. I’m a Developer, not a Tester; and the QTP forums aren’t responding – Help me SO!

This is the code I tried — which works but lacks a Checkpoint:

Dim con, rs,strSQL, Param1, Param2 Param1 = DataTable('B', dtGlobalSheet) Param2 = DataTable('A', dtGlobalSheet) Set con=Createobject('ADODB.Connection') Set rs=Createobject('ADODB.recordset') rs.CursorLocation = 3 rs.CursorType =3 connSTR= 'Driver={SQL Server};Server=vsql0001;Database=DB0001;Dsn=myRegistryName' con.open connSTR strSQL= 'select Field1, Field2 from dbo.Table1 where Field1 in (select Field1 from     dbo.Table2 where Param2 like '%'+Param2+'%' and active = 1) and (Field2     = ''+Param1+'' or Field2 like ''+Param1+' %' or Field2 like '%*'+Param1+'' or Field2     like '%*'+Param1+'*%')' rs.open strSQL, con msgbox rs.recordcount   ' want the CP to go here rs.close con.close 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T05:54:16+00:00Added an answer on May 11, 2026 at 5:54 am

    Got it. I give it the static query and change it before it evaluates.

    strSQL= 'select [...]' DbTable('DbTable').SetTOProperty 'Source', strSQL DbTable('DbTable').Check CheckPoint('DbTable') 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this MySQL query. I have database fields with this contents sports,shopping,pool,pc,games shopping,pool,pc,games
i have database table like this +-------+--------------+----------+ | id | ip | date |
I have database with schema on picture below and I need to select everything
I have database table but without the index, and I want to add index
I have database schema for an integration project in which I need to be
I have database result like this ID | NAME | TYPE -------------------- 1 |
I have database of about 5 tables. I am going to need to get
I have database, and in one the tables I need change the values of
I have database cleanup that I need to do within a running service thread.
I have database with many tables. In the first table, I have a field

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.