Posts: 3
Threads: 1
Joined: Jul 2008
Reputation:
0
08-06-2008, 04:20 PM
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
Posts: 3
Threads: 1
Joined: Jul 2008
Reputation:
0
08-06-2008, 05:45 PM
But your solution seems to be for script only. I'd like to pass parameter into sql statement in database checkpoint.
Posts: 32
Threads: 2
Joined: Jul 2008
Reputation:
0
08-07-2008, 12:28 PM
(This post was last modified: 08-07-2008, 12:34 PM by anemuday.)
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.