Micro Focus QTP (UFT) Forums
Parameter in SQL query in Database Checkpoint - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Parameter in SQL query in Database Checkpoint (/Thread-Parameter-in-SQL-query-in-Database-Checkpoint)



Parameter in SQL query in Database Checkpoint - links - 08-06-2008

Hi!

I've got some problem. How to pass any parameter into sql query in database checkpoint?

For example. I'm creating new db checkpoint, typing Connection String and SQL statement like this: "Select * from my_table where id = ?". Instead of "?" I want to insert some parameter from Data Table or a variable.
Any solution?

Best regards


RE: Parameter in SQL query in Database Checkpoint - stevol - 08-06-2008

with a concatenation [ symbol & ]:

Code:
dim query
query = "Select * from my_table where id = " & variable



RE: Parameter in SQL query in Database Checkpoint - links - 08-06-2008

But your solution seems to be for script only. I'd like to pass parameter into sql statement in database checkpoint.


RE: Parameter in SQL query in Database Checkpoint - anemuday - 08-07-2008

Hi,

As far as i concerned, we can create the DB checkpoint using Database Query Wizard. Which you will get by Insert -> Check Point -> Database Checkpoint. Once you select Database checkpoint, "Database Query Wizard" window will be opened, and there you have to give your DSN and the query string to verify the values in the DB.

Once done, QTP generates a script "DbTable("DbTable").Check CheckPoint("DbTable")".

Thats all, while running the script QTP executes the query string with the present table details and verifies the values.

I think there is no direct method to pass this query string to "Database Query Wizard".

If anybody knows other ways to pass parameters to "Database Query Wizard" please let me know.

Regards,
Uday.