Posts

Showing posts with the label Run Error The parametr is incorrect

Passing Long Integers from datatable using CDbl

Image
You might have wanted to pass long integers like from 10 - 13 digits and every time you execute your code, QTP datatable changes your integer value into some scientific value containing plus(+) and decimal signs. Changing the column 'Format' does not seems to be beneficial. (At least not for me). For example if you have tried automating a payment form that takes in credit card number and other details, you might have came across this problem. So here i will be telling you about some very useful build-in functions that can help in this error. Executing the code below will give you an error of invalid input as the value in your datatable will be something like 1.111111111E+111. Browser("name:=.*").Page("title:=.*").WebEdit("html id:=some id").Set DataTable("CardNumber",dtGlobalSheet) Changing column format to Fixed, Custom or any other will give you following error 'The parameter is incorrect' So let us play with some variables...