Micro Focus QTP (UFT) Forums
Database Checking - 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 Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: Database Checking (/Thread-Database-Checking)



Database Checking - Rajesh - 01-14-2008

Hi,

Assume in the database we have a table named "X".
I have Created or added a new column to the table "X".
Now I want to insert a check point to ensure the Newely created column is added to the table.

Could some one let me know your comments.
Is it possible?????


RE: Database Checking - Ankur - 01-16-2008

Two ways,

1) check for the column --- select xyz from table if column exist it will show you the data else it will raise an error. Use err object to raise and capture the error ( if it occurs)

2) Other method can be to download the table before and after inserting the column in excel and use getparametercount to get the no of columns each time. If diff is 1 then the column is inserted.

I would prefer the 1st method. 2nd, In my opinion is not efficient.