Hi all,

I am trying to add an attachment to a defect to quality center from my application using OTA api.I have attached the code fragment below

'logic for attachment
Dim attachfact As TDAPIOLELib.AttachmentFactory
Dim attachObj As TDAPIOLELib.Attachment
'get the attachment factory object of the corresponding bug
attachfact = theBug.Attachments
'get a new attachment object
attachObj = attachfact.AddItem(System.DBNull.Value)
'set the attachment object properties
attachObj.FileName = "untitled.bmp"
attachObj.Description = "this is first attachment"
'commit to database

'use extended storage object for actual upload
Dim extStorage As TDAPIOLELib.IExtendedStorage
extStorage = attachObj.AttachmentStorage
extStorage.ClientPath = "C:\"
extStorage.Save("untitled.bmp", True)

while executing this code,the application throws an
exception at the lastline
i.e extStorage.Save("untitled.bmp", True)
"Server has been disconnected while performing UploadRepositoryFiles action"

Please help me.

Waiting for a positive response.