Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Parameter in SQL query in Database Checkpoint
#1
Not Solved
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
Reply
#2
Not Solved
with a concatenation [ symbol & ]:

Code:
dim query
query = "Select * from my_table where id = " & variable
Reply
#3
Not Solved
But your solution seems to be for script only. I'd like to pass parameter into sql statement in database checkpoint.
Reply
#4
Not Solved
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Exe invoked through UFT is unable to access IIS and SQL Server service bkdevise 0 1,971 08-25-2015, 05:49 PM
Last Post: bkdevise
  Query regarding "Call" statement anupam4j 1 1,908 09-26-2014, 01:46 PM
Last Post: vinod123
  parameterize Excel Sheet Name in SQL bjitsidhu 0 2,731 07-20-2014, 08:34 AM
Last Post: bjitsidhu
  Is there a possible way to execute sql in QTP using 'WITH' clause shruthic 0 2,987 04-26-2014, 11:42 PM
Last Post: shruthic
  Action Parameter passing problem Qtpuser1 1 2,709 04-18-2014, 06:23 AM
Last Post: kgovadav

Forum Jump:


Users browsing this thread: 1 Guest(s)