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: Database Checkpoint (/Thread-Database-Checkpoint) |
Database Checkpoint - amilar - 01-13-2009 Hi All, I have a problem in database checkpoint. I know how to do a database checkpoint. But I don’t know how it integrates or put it with a web application. As an example, when I want to check search value with database value, how can I do it?. How do I connect database checkpoint with my search result window or grid. If any one knows about any idea, please let me know. Thanks regards, Amila RE: Database Checkpoint - Jackomcnabb - 01-20-2009 A Database check would be dependant on what you need to check.... is it the number of records being returned or the actual field name values? What database are you connecting to? for examples of connection strings see: http://www.connectionstrings.com/ I have a control file that the Parameters are passed from I'm connecting to three different databases depending which on is switched on the control file on my test box. Code: DBType=GetLocalParameter("profile.database") Once you have opened the connection to the server all you need to do is run the SQL query: Code: Set Rec = CreateObject("ADODB.Recordset") for me I'm just verifying the number of records being returned so my "sqlstring" is being built in another process and as it only returns the count you can put the count in a variable as below Code: Total_Count=rec(0) Then you can do a compare with you database count and the number of records displayed on your Application.. RE: Database Checkpoint - amilar - 01-20-2009 Thanks, I wrote a function for database connection and select query, but i can't retrieve data from the function. if u know the way please let me know... thanks. my function Code: Function ConnectDatabase() Regards, Amila RE: Database Checkpoint - Jackomcnabb - 01-20-2009 when you call the function you need to what variable that you are going to retrieve: Code: <VariableName>=<FunctionName> my code is like this: Code: RecordNumbers = get_record_counts (PartialName, PartialNameCounty, PartialNameCity, IncludeAbbrev,Search_Level, Show_Full, Search_Method) |