lockdown
(Member)
04/03/12 02:47 AM
Re: Datatable.export failed!!

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




Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5