Question concerning Database Query in QTP
I'm trying to query a database and return the value to QTP. My problem is that I need to take a serial number that is generated in a previous step (and is stored in the GlobalSheet) and use that as part of my SQL query.
I'm trying to do something like:
SELECT OUTPUT FROM DB_TABLE
WHERE TXN = DataTable("TX", dtGlobalSheet)
I can't seem to figure out how to make the value for 'TXN' be read from the DataTable in QTP.
I tried to do Insert -> Output Value -> DataBase Output Value, but I can't get that to work.
Re: Question concerning Database Query in QTP
Try something like this.
Query = "SELECT OUTPUT FROM DB_TABLE
WHERE TXN ='"&DataTable("TX", dtGlobalSheet)&"'"
'Execute Query here