Re: QTP 8.0: Change of Database checkpoints properties
From what your asking (if my assumption is correct), you could try this piece of code created by a guy called Peter Schumacher.. (no relation to the race car driver i don't think [img]images/icons/wink.gif[/img] ). Hope this helps:
Dim strSQL, strNewSQL,strLOGIN_NAME
' Note that 'blank' is a place holder which should not exist - this way, it should fail and stop the
' run if the follwing string substitution doesn't work "correctly"
strSQL = "SELECT CUSTOMER.LOGIN_ID, CUSTOMERS.LOGIN_NAME FROM <DATABASE>.CUSTOMERS" &_
' Get the users login name from the "local" worksheet, default.xls data table (at run time)
' (the column name is 'loginName')
strLOGIN_NAME = DataTable("loginName",dtLocalSheet)
' Swap the place holder "blank" with real login name
strNewSQL = replace(strSQL,"blank",strLOGIN_NAME)
'Change the source select statement to use the new dynamic SQL query
DbTable("DbTable").SetTOProperty "Source", strNewSQL
strNewSQL = DbTable("DbTable").GetTOProperty("Source")
' Confirm that the current user was added to the database, using his login name and send the result
' to the result report
Reporter.ReportEvent micPass, "Add User To Database:", strLOGIN_NAME & " Query Confirmation Result -->"
Services.LogMessage ("User successfully added to the database: " & strLOGIN_NAME), StatusMsg'
' end of dynamic checkPoint
Good luck and i hope this is the kind of thing you are looking for.