DimkaNewtown
Active member
I have a client application written in C# that utilizes a Business Logic Layer written in VB6.0 which utilizes Data Access Layer written in VB6.0.
The application worked fine up until I started getting this error "Unspecified Error" which is a System.Runtime.InteropServices.COMException.
Heres is the code:
it happens on this line
The strangest thing is that this function is called to refresh a ListView after an item has been added or deleted and it works correctly the first time without a hitch. The second time around the exception is thrown on the line I wrote above.
After that every single call to the COM object fails.
This is getting ridiculous.
Has anyone encountered this before?
The application worked fine up until I started getting this error "Unspecified Error" which is a System.Runtime.InteropServices.COMException.
Heres is the code:
C#:
private void LoadShippingData()
{
Recordset rs = null;
try
{
Global.CS.GetShippingRequestData( Global.ConnectString, ref rs, ref _SRID );
if( rs.Fields["Carrier"].Value.ToString() != "FedEx" )
cmbShippingCarrier.SelectedIndex = 1;
else
cmbShippingCarrier.SelectedIndex = 0;
rs.Close();
LV_ShippingItems.Items.Clear();
Global.CS.GetShippingRequestDetails( Global.ConnectString, ref rs, ref _SRID );
object oEquipID;
ListViewItem lvi;
Recordset rsEquip = new Recordset();
while( !rs.EOF )
{
oEquipID = rs.Fields["EquipID"].Value;
Global.CS.GetEquipData( Global.ConnectString, ref rsEquip, ref oEquipID );
if( !rsEquip.EOF )
{
lvi = new ListViewItem();
lvi.BackColor = LV_ShippingItems.BackColor;
lvi.Tag = rs.Fields["s_GUID"].Value;
lvi.Text = rsEquip.Fields["SN"].Value.ToString();
lvi.SubItems.Add( rsEquip.Fields["LotNum"].Value.ToString() );
lvi.SubItems.Add( rsEquip.Fields["ModelName"].Value.ToString() );
try
{
lvi.SubItems.Add( DateTime.Parse(rsEquip.Fields["ExpDate"].Value.ToString()).ToString("MM/dd/yyyy"));
}
catch
{
}
finally
{
LV_ShippingItems.Items.Add( lvi );
}
}
rs.MoveNext();
}
}
catch( Exception ex )
{
Global.HandleError( this.Name, "LoadShippingData", ex.InnerException + "\n" + ex.Message + "\n" + ex.Source + "\n" + ex.StackTrace );
}
return;
}
it happens on this line
C#:
Global.CS.GetShippingRequestDetails( Global.ConnectString, ref rs, ref _SRID );
The strangest thing is that this function is called to refresh a ListView after an item has been added or deleted and it works correctly the first time without a hitch. The second time around the exception is thrown on the line I wrote above.
After that every single call to the COM object fails.
This is getting ridiculous.
Has anyone encountered this before?