The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:




Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> HP Functional Testing / Mercury QuickTest Pro / QTP

lockdown
Member


Reged: 02/07/07
Posts: 393
Loc: London
Re: Datatable.export failed!!
      04/03/12 02:47 AM

If it's random then I would suggest wrapping this into a function, and loop around the export until it works.

something like this might help (coded off the top of my head so apologies for any errors - place this into a function or where your export code is):

Code:

Dim blnFlag : blnFlag = false
Dim n
on error resume next
do while (not blnFlag )
err.clear
'try to export
Datatable.export("C:\wherever.xls")
if err = 0 then
blnFlag = true
else
n = n + 1
wait(1)
if n = 10 then
'output some kind of error and break the loop
blnFlag = true
end if
end if
loop
on error goto 0



--------------------
Automation Blog

Post Extras Print Post   Remind Me!     Notify Moderator


Entire topic
Subject Posted by Posted on
* Datatable.export failed!! Vijay_Gupta 03/31/12 10:26 PM
. * * Re: Datatable.export failed!! ManishBansal   04/02/12 01:23 AM
. * * Re: Datatable.export failed!! Vijay_Gupta   04/02/12 09:58 PM
. * * Re: Datatable.export failed!! lockdown   04/03/12 02:47 AM
. * * Re: Datatable.export failed!! Vijay_Gupta   04/03/12 11:51 PM
. * * Re: Datatable.export failed!! lockdown   04/04/12 12:58 AM
. * * Re: Datatable.export failed!! Vijay_Gupta   04/04/12 02:23 AM
. * * Re: Datatable.export failed!! ManishBansal   04/06/12 02:35 AM
. * * Re: Datatable.export failed!! ManishBansal   04/06/12 02:46 AM
. * * Re: Datatable.export failed!! MilesToGoBeforeISleep   04/06/12 03:21 AM
. * * Re: Datatable.export failed!! ManishBansal   04/06/12 03:22 AM
. * * Re: Datatable.export failed!! karthikbhatnagar   04/06/12 03:54 AM
. * * Re: Datatable.export failed!! ManishBansal   04/06/12 06:03 AM
. * * Re: Datatable.export failed!! ManishBansal   04/09/12 06:54 AM

Extra information
0 registered and 55 anonymous users are browsing this forum.

Moderator:  IanFraser, Rajkumar_Rajangam, thorwath, TReddy, AJ, Tarun Lalwani, mwsrosso 



Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Thread views: 2127

Rate this thread

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5