Micro Focus QTP (UFT) Forums
parameterize Excel Sheet Name in SQL - 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: parameterize Excel Sheet Name in SQL (/Thread-parameterize-Excel-Sheet-Name-in-SQL)



parameterize Excel Sheet Name in SQL - bjitsidhu - 07-20-2014

Code:
Dim strQuery, sheetName
    sheetName="pSheetOrFileName$"
    Dim strTestID  : strTestID=Trim("One")                                  
    Set objConnection = fnGetConnection(strFilePath)
    strQuery="SELECT * FROM  ['"&sheetName"'] WHERE TestID='"&strTestID&"' "


I used this code and wish to provide excel sheet Name dynamically.... In above code have issue
Any suggestion for correction welcome...........