in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Rtf Export to Network Drive Error

Last post 03-07-2008 2:22 AM by C1_Dima. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-06-2008 6:23 PM

    Rtf Export to Network Drive Error

    C1Preview.2_2.0.20073.42111

    Our application exports a series of rtf and pdf versions of each document to a central network drive. This can number up to 100. I use the following code:

    Dim lexpFileExportRTF As New C1.C1Preview.Export.RtfExporter
    lexpFileExportRTF.Paginated = True
    lexpFileExportRTF.Preview = False
    lexpFileExportRTF.ShowOptions = False
    lexpFileExportRTF.Document = C1PrintDocument1
    lexpFileExportRTF.Export(lstrFileName)


    All works very well, but periodically will return an error:
    Error Description: The specified network name is no longer available.
    Stack Trace:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

    at System.IO.FileStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)
       at System.IO.FileStream.FlushWrite(Boolean calledFromFinalizer)
       at System.IO.FileStream.Flush()
       at System.IO.BinaryWriter.Flush()
       at System.IO.BinaryWriter.get_BaseStream()
       at hb.f()
       at ff.a(hb A_0)
       at th.a(hb A_0)
       at nu.a(Stream A_0, Boolean A_1)
       at nu.l(String A_0)
       at C1.C1Preview.Export.RtfExporter.InternalExport()
       at C1.C1Preview.Export.Exporter.Export(String fileName)
       at ShedBuilder.frmPrintOptionsC1.MakeDocumentExport(C1PrintDocument C1PrintDocument1, String pstrFileName, String pstrFileExtension) in C:\GarageWorldDotNet\ShedBuilder.NET\frmPrintOptionsC1.vb:line 819 

    at this stage lstrFileName maybe "H:\ShedDataMasterDotNet\ShedOrders\1788-2341-1-Anderson_Bracketry.rtf"

    It only happens to rtf, not the same file each time. I am wondering if it could be a timing issue with the server access? The file is actually created when this error occurs, but the file is empty/corrupt.

    Any ideas?

    Regards, Dale

     

     

    Filed under: ,
  • 03-07-2008 2:22 AM In reply to

    Re: Rtf Export to Network Drive Error

    I'm sorry but I don't really see how this could be a bug in C1Preview. I could be wrong of course, but - no ideas. 

    Cheers,
    Dima.
Page 1 of 1 (2 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.