Micro Focus QTP (UFT) Forums
Case changes while reading values from inbuilt datatables - 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: Case changes while reading values from inbuilt datatables (/Thread-Case-changes-while-reading-values-from-inbuilt-datatables)



Case changes while reading values from inbuilt datatables - krishnakittu03 - 04-21-2015

Hi,
I am automating a .Net Application where i need to read values from datatables. Values in datatable is combination if capital and small letters.Example: "HP uft"
While reading through the script , values changes as "hp uft". this makes my script fail on validation.

plz help me if anyon aware of the issue

Thanks in advance.


RE: Case changes while reading values from inbuilt datatables - babu123 - 04-23-2015

Use Lcase("Hp Uft") or use instr(0,string1,string2)<>0 can resolve....


RE: Case changes while reading values from inbuilt datatables - krishnakittu03 - 04-24-2015

Thanks for ur reply ,
But y should i use "Lcase("Hp Uft")" when i want the string as it is in the data table cell?. Also this is not always and it is sporadic


RE: Case changes while reading values from inbuilt datatables - kbhargava505 - 04-28-2015

while getting the datatable value use Cstr() to convert that value to string.