Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Type mismatch is displayed for .SET method (Blank value)
#1
Solved: 10 Years, 8 Months, 3 Weeks ago
Hi,
I am using QTP9.5.
I am reading blank value from MSAccess Data table (means no value in the field).
The value is assigned to a variable & then set to a text field on screen (SWING UI).

Eg
Code:
strFlightID =  arrABC(FlightID)  'value from Access data table (blank)

JavaWindow("A").JavaInternalFrame("Flight").JavaEdit("FlightField").Set(strFlightID)

During run time display following error :
Type mismatch: 'JavaWindow(...).JavaInternalFrame(...).JavaEdit(...).set'


Why the error is displayed because in text field we can enter blank value?
Is any solution on it?
Is the same issue in QTP10.0?

Thanks in advance.
Dinesh
Reply
#2
Solved: 10 Years, 8 Months, 3 Weeks ago
Code:
strFlightID = arrABC(FlightID) 'value from Access data table (blank)
If IsNull(strFlightID) Then
    strFlightID=""
End If
JavaWindow("A").JavaInternalFrame("Flight").JavaEdit("FlightField").Set(strFlightID)

Try to use the above code...While taking from Access it will give
strFlightID =Null
To avoid this try using the above code,i think it will solve your problem..

Kindly update on the progress..
Reply
#3
Solved: 10 Years, 8 Months, 3 Weeks ago
Thanks Arun for the quick response.
It is working fine.
If you know, could youl tell me "Is the same issue in QTP10.0?"
Thanks again.
Reply
#4
Solved: 10 Years, 8 Months, 3 Weeks ago
Yaa Dinesh this is the same issue in QTP 10.0 also...
Reply
#5
Solved: 10 Years, 8 Months, 3 Weeks ago
Thanks Arun.
Dinesh
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  "UFT has stopped working" is displayed during running the script kotaramamohana 0 1,197 08-24-2018, 01:07 PM
Last Post: kotaramamohana
Question Is there a way to create dynamic objects by declaring the type of object as parameter lotos 3 1,967 11-08-2017, 11:15 PM
Last Post: lotos
  array to be captured and displayed Anu209 0 1,152 06-24-2017, 10:19 AM
Last Post: Anu209
  Multiple 2 IE browsers are being displayed VA1405 1 1,754 01-15-2014, 07:20 AM
Last Post: basanth27
Sad QTP Script | how to get object of some open window just using its class type,Java sophia.sabir 1 8,673 08-07-2013, 01:26 PM
Last Post: anil2u

Forum Jump:


Users browsing this thread: 1 Guest(s)