[Mono-bugs] [Bug 559603] New: Data Binding between SQlite/MS Access DB and user interface causes error during start-up of applicatin

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Dec 1 12:19:50 EST 2009


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

http://bugzilla.novell.com/show_bug.cgi?id=559603#c0


           Summary: Data Binding between SQlite/MS Access DB and user
                    interface causes error during start-up of applicatin
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.6.x
          Platform: x86
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Data
        AssignedTo: bnc-blr-team-mono at forge.provo.novell.com
        ReportedBy: patrick.maeder at tu-ilmenau.de
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=330310)
 --> (http://bugzilla.novell.com/attachment.cgi?id=330310)
Simple Visual Studio Project producing the error

Description of Problem:
There seems to be a problem with data binding between data sets and UI
elements. I created/imported a dataset in a C# project through the VS Wizzard
and bound one column of one table to a text box on a form. I experienced a
different error while running my application on 2.4 and Ivan Zlatev suggested
to try the application on 2.6
(http://ivanz.com/2009/01/15/datagridview-revamp/). Now the exception below is
thrown. In this example, I'm using the System.Data.SQLite provider, but I
experienced similar problems with system.data.oledb.

Steps to reproduce the problem:
1. run application contained in the attached file on Mono and compare with .NET

Actual Results:
Unhandled Exception: System.ArgumentException: Cannot bind to property 'id' on
DataSource.
Parameter name: dataMember
  at System.Windows.Forms.Binding.Check () [0x0018d] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Binding.cs:367
  at System.Windows.Forms.Control.CheckDataBindings () [0x00029] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:1864
  at System.Windows.Forms.Control.OnBindingContextChanged (System.EventArgs e)
[0x00000] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:6006
  at System.Windows.Forms.Control.OnParentBindingContextChanged
(System.EventArgs e) [0x00027] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:6455
  at System.Windows.Forms.Control.OnBindingContextChanged (System.EventArgs e)
[0x00031] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:6010
  at System.Windows.Forms.Control.set_BindingContext
(System.Windows.Forms.BindingContext value) [0x00013] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:2383
  at System.Windows.Forms.ContainerControl.get_BindingContext () [0x0000b] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6\mcs\class\Managed.Windows.Forms\System.Windows.Forms\ContainerControl.cs:395
  at System.Windows.Forms.Control.get_BindingContext () [0x0001f] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:2377
  at System.Windows.Forms.Binding.Check () [0x00000] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Binding.cs:337
  at System.Windows.Forms.Control.CheckDataBindings () [0x00029] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:1864
  at System.Windows.Forms.Control.OnBindingContextChanged (System.EventArgs e)
[0x00000] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:6006
  at System.Windows.Forms.Control.OnParentBindingContextChanged
(System.EventArgs e) [0x00027] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:6455
  at System.Windows.Forms.Control.OnBindingContextChanged (System.EventArgs e)
[0x00031] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:6010
  at System.Windows.Forms.ContainerControl.OnCreateControl () [0x00006] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6\mcs\class\Managed.Windows.Forms\System.Windows.Forms\ContainerControl.cs:582
  at System.Windows.Forms.Form.OnCreateControl () [0x00000] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Form.cs:2099
  at System.Windows.Forms.Control.CreateControl () [0x000a3] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:3804
  at System.Windows.Forms.Control.SetVisibleCore (Boolean value) [0x00043] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:5072
  at System.Windows.Forms.Form.SetVisibleCore (Boolean value) [0x0007b] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Form.cs:2461
  at System.Windows.Forms.Control.set_Visible (Boolean value) [0x0000c] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:3436
  at (wrapper remoting-invoke-with-check)
System.Windows.Forms.Control:set_Visible (bool)
  at System.Windows.Forms.Application.RunLoop (Boolean Modal,
System.Windows.Forms.ApplicationContext context) [0x00059] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Application.cs:864

  at System.Windows.Forms.Application.Run
(System.Windows.Forms.ApplicationContext context) [0x00014] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Application.cs:763
  at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm)
[0x00000] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Application.cs:742
  at MonoTest.Program.Main () [0x0000e] in C:\Dokumente und
Einstellungen\Administrator\Desktop\MonoTest\MonoTest\Program.cs:17

Expected Results:
- the application should start and a value should be displayed on the form

How often does this happen? 
- every time the application is being started

Additional Information:
- the attached file contains a simple Visual Studio project and a SQlite DB. 
The project contains a form and a dataset; and no handwritten code. One of the
datasets fields has been bound to a text box on the form. After staring the
text box should display the value '123' from the database.

Thank you

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


More information about the mono-bugs mailing list