[Mono-bugs] [Bug 496179] New: System.InvalidCastException: Cannot cast from source type to destination type. at System.Data.Common.Int32DataContainer.DoCopyValue

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Apr 17 16:19:02 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=496179


           Summary: System.InvalidCastException: Cannot cast from source
                    type to destination type.   at
                    System.Data.Common.Int32DataContainer.DoCopyValue
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.4.x
          Platform: i386
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: generics
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: jhmgbl2 at t-online.de
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.0.5)
Gecko/2008120122 Firefox/3.0.5 (.NET CLR 3.5.30729)

LinuxErr: Application Error  at 17.04.2009 19:43:59 gstatus:
_frmSearchText.btnS
earch_Click Import Row System.Data.DataRow CodeLoc:
_frmSearchText.btnSearch_Cli
ck Version: 0.7.5.36034
System.InvalidCastException: Cannot cast from source type to destination type.
  at System.Data.Common.Int32DataContainer.DoCopyValue
(System.Data.Common.DataC
ontainer from, Int32 from_index, Int32 to_index) [0x00000] in
C:\cygwin\tmp\mono
build\build\BUILD\mono-2.4\mcs\class\System.Data\System.Data.Common\DataContaine
r.cs:528
  at System.Data.Common.DataContainer.CopyValue
(System.Data.Common.DataContaine
r from, Int32 from_index, Int32 to_index) [0x00000] in
C:\cygwin\tmp\monobuild\b
uild\BUILD\mono-2.4\mcs\class\System.Data\System.Data.Common\DataContainer.cs:16
4
  at System.Data.Common.RecordCache.CopyRecord (System.Data.DataTable
fromTable,
 Int32 fromRecordIndex, Int32 toRecordIndex) [0x0004a] in
C:\cygwin\tmp\monobuil
d\build\BUILD\mono-2.4\mcs\class\System.Data\System.Data.Common\RecordCache.cs:1
12


Reproducible: Always

Steps to Reproduce:
1. Download
https://sourceforge.net/project/downloading.php?group_id=257087&filename=Repetit.Net.T.Mono_0_7_5_12.tar.gz&a=88844081
and install to an empty directory and run with mono 2.4 (win)
2.Enter some data in the database (for example with file: Test data)
3.Click on search:text search and enter some search words that are in the
database, check all checkboxes, click on search.
Actual Results:  
there is an error message which can be caught. Only a few results are shown in
the treeview

Expected Results:  
There should be more results in the treeview.

Thre Code is:
For Each dr In dt.Rows
            gStatus = CodeLoc & " Import Row " & dr.ToString
            If _dtMedikamente.FindByID(CInt(dr!ID)) Is Nothing Then
              Try
                _dtMedikamente.ImportRow(dr)
              Catch e As ConstraintException
                'NOP
              Catch e As Exception
#If Linux Then
                LinuxErr(e, CodeLoc)
#Else
                Throw New ApplicationException(CodeLoc & " Error ImportRow!",
e)
#End If
              End Try
            End If
          Next

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list