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

connection string

rated by 0 users
This post has 11 Replies | 0 Followers

Top 50 Contributor
Posts 121
albertsmus Posted: Tue, Feb 6 2007 7:26 AM
    i installed the c1 samples on another hard disk. i am testing the ClientFilterSortFind.vbproj project and i tried to change the connection string of the c1DataViewSet1 on the ConnectionOpening event by this way:
 Private Sub c1DataViewSet1_ConnectionOpening(ByVal sender As Object, ByVal e As C1.C1DataExtender.ConnectionOpeningEventArgs) Handles c1DataViewSet1.ConnectionOpening
        Dim sfile As String = "h:\Program Files\ComponentOne Studio.NET 2.0\Common\Nwind.mdb"
        c1DataViewSet1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + sfile + ";Persist Security Info=False"
    End Sub

i got the fillowing error:
System.StackOverflowException was unhandled
An unhandled exception of type 'System.StackOverflowException' occurred in System.Data.dll
if i click on detail i get the following:
Data  error: cannot obtain value
what is wrong. is it possible to have some code where someone would change on the fly the connection string?
Thanks for help anyway


Top 50 Contributor
Posts 121

if i change the code lke that "Private Sub c1DataViewSet1_ConnectionOpening(ByVal sender As Object, ByVal e As C1.C1DataExtender.ConnectionOpeningEventArgs) Handles c1DataViewSet1.ConnectionOpening
        Dim sfile As String = "h:\Program Files\ComponentOne Studio.NET 2.0\Common\Nwind.mdb"
        c1DataViewSet1.Connection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + sfile + ";Persist Security Info=False"

    End Sub"  i get the following:

System.InvalidOperationException was unhandled
  Message="an error ocurred while creating the form. see Exception.InnerException for details. the error is:there is no object reference in an object presence."
  Source="ClientFilterSortFind"
  StackTrace:
       σε ClientFilterSortFind.My.MyProject.MyForms.Create__Instance__[T](T Instance) στο 17d14f5c-a337-4978-8281-53493378c1071.vb:line190
       σε ClientFilterSortFind.My.MyProject.MyForms.get_Form1()
       σε ClientFilterSortFind.My.MyApplication.OnCreateMainForm() στο H:\Program Files\ComponentOne Studio.NET 2.0\C1DataExtender\Samples\VB\ClientFilterSortFind\My Project\Application.Designer.vb:line 34
       σε Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       σε Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       σε Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       σε ClientFilterSortFind.My.MyApplication.Main(String[] Args) στο 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
       σε System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
       σε System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       σε Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       σε System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       σε System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       σε System.Threading.ThreadHelper.ThreadStart()




 albertsmus wrote:
    i installed the c1 samples on another hard disk. i am testing the ClientFilterSortFind.vbproj project and i tried to change the connection string of the c1DataViewSet1 on the ConnectionOpening event by this way:
 Private Sub c1DataViewSet1_ConnectionOpening(ByVal sender As Object, ByVal e As C1.C1DataExtender.ConnectionOpeningEventArgs) Handles c1DataViewSet1.ConnectionOpening
        Dim sfile As String = "h:\Program Files\ComponentOne Studio.NET 2.0\Common\Nwind.mdb"
        c1DataViewSet1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + sfile + ";Persist Security Info=False"
    End Sub

i got the fillowing error:
System.StackOverflowException was unhandled
An unhandled exception of type 'System.StackOverflowException' occurred in System.Data.dll
if i click on detail i get the following:
Data  error: cannot obtain value
what is wrong. is it possible to have some code where someone would change on the fly the connection string?
Thanks for help anyway


Top 50 Contributor
Posts 263
You should provide a new connection string via event arguments, i.e.:
e.Connection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + sfile + ";Persist Security Info=False"
 
Alex
<albertsmus> wrote in message news:191220@test.componentone.com...

if i change the code lke that "Private Sub c1DataViewSet1_ConnectionOpening(ByVal sender As Object, ByVal e As C1.C1DataExtender.ConnectionOpeningEventArgs) Handles c1DataViewSet1.ConnectionOpening
        Dim sfile As String = "h:\Program Files\ComponentOne Studio.NET 2.0\Common\Nwind.mdb"
        c1DataViewSet1.Connection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + sfile + ";Persist Security Info=False"

    End Sub"  i get the following:

System.InvalidOperationException was unhandled
  Message="an error ocurred while creating the form. see Exception.InnerException for details. the error is:there is no object reference in an object presence."
  Source="ClientFilterSortFind"
  StackTrace:
       σε ClientFilterSortFind.My.MyProject.MyForms.Create__Instance__[T](T Instance) στο 17d14f5c-a337-4978-8281-53493378c1071.vb:line190
       σε ClientFilterSortFind.My.MyProject.MyForms.get_Form1()
       σε ClientFilterSortFind.My.MyApplication.OnCreateMainForm() στο H:\Program Files\ComponentOne Studio.NET 2.0\C1DataExtender\Samples\VB\ClientFilterSortFind\My Project\Application.Designer.vb:line 34
       σε Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       σε Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       σε Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       σε ClientFilterSortFind.My.MyApplication.Main(String[] Args) στο 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
       σε System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
       σε System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       σε Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       σε System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       σε System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       σε System.Threading.ThreadHelper.ThreadStart()




 albertsmus wrote:
    i installed the c1 samples on another hard disk. i am testing the ClientFilterSortFind.vbproj project and i tried to change the connection string of the c1DataViewSet1 on the ConnectionOpening event by this way:
 Private Sub c1DataViewSet1_ConnectionOpening(ByVal sender As Object, ByVal e As C1.C1DataExtender.ConnectionOpeningEventArgs) Handles c1DataViewSet1.ConnectionOpening
        Dim sfile As String = "h:\Program Files\ComponentOne Studio.NET 2.0\Common\Nwind.mdb"
        c1DataViewSet1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + sfile + ";Persist Security Info=False"
    End Sub

i got the fillowing error:
System.StackOverflowException was unhandled
An unhandled exception of type 'System.StackOverflowException' occurred in System.Data.dll
if i click on detail i get the following:
Data  error: cannot obtain value
what is wrong. is it possible to have some code where someone would change on the fly the connection string?
Thanks for help anyway




http://home.componentone.com/cs/forums/191215/ShowPost.aspx#191220

Top 50 Contributor
Posts 121
Thank you this workeed fine. I have another one question. i have a form with a c1dbnavigator, a c1truedbgrid, a c1textbox control, a c1dataviewset and i created a dataset named BASKOUSNEO2007DataSet. if i set the  datasource  of the c1dbnavigator and c1truedbgrid the c1dataviewset and as datamember a view  called "pelatesView" which i created and set none  as datasource of the c1textbox 's the form open normally. if i also set the same dataset and datamember for the c1textbox control i get the following error.
System.ArgumentException was unhandled
  Message="it's not possible to create a childlist for the field pelatesView."
  Source="System.Windows.Forms"
  StackTrace:
       in System.Windows.Forms.BindingContext.EnsureListManager(Object dataSource, String dataMember)
       σε System.Windows.Forms.BindingContext.UpdateBinding(BindingContext newBindingContext, Binding binding)
       in System.Windows.Forms.Control.UpdateBindings()
       in System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)
       in System.Windows.Forms.Control.OnParentBindingContextChanged(EventArgs e)
       in System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)
       in System.Windows.Forms.Control.OnParentBindingContextChanged(EventArgs e)
       in System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)
       in System.Windows.Forms.Control.OnParentBindingContextChanged(EventArgs e)
       in System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)
       in System.Windows.Forms.Control.set_BindingContextInternal(BindingContext value)
       in System.Windows.Forms.ContainerControl.set_BindingContext(BindingContext value)
       in System.Windows.Forms.ContainerControl.get_BindingContext()
       in System.Windows.Forms.Control.get_BindingContextInternal()
       in System.Windows.Forms.Control.get_BindingContext()
       in System.Windows.Forms.Control.get_BindingContextInternal()
       in System.Windows.Forms.Control.get_BindingContext()
       in System.Windows.Forms.Control.get_BindingContextInternal()
       in System.Windows.Forms.Control.get_BindingContext()
       in System.Windows.Forms.Control.UpdateBindings()
       in System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)
       in System.Windows.Forms.Control.OnParentBindingContextChanged(EventArgs e)
       in System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)
       in System.Windows.Forms.Control.OnParentBindingContextChanged(EventArgs e)
       in System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)
       in System.Windows.Forms.Control.AssignParent(Control value)
       in System.Windows.Forms.Control.ControlCollection.Add(Control value)
       in System.Windows.Forms.Form.ControlCollection.Add(Control value)
       in Bas_Kous.frmTest.InitializeComponent() στο G:\Πλιάχας Πασχάλης\Τα έγγραφά μου\ergasia1\pas\VB Net\Bas_Kous\bas_kous_agores_net2\frmTest.Designer.vb:line320
       in Bas_Kous.frmTest..ctor()
       in Bas_Kous.frmMain.MnuPel_Click(Object sender, ClickEventArgs e) στο G:\Πλιάχας Πασχάλης\Τα έγγραφά μου\ergasia1\pas\VB Net\Bas_Kous\bas_kous_agores_net2\frmMain.vb:line461
       in C1.Win.C1Command.C1Command.OnClick(ClickEventArgs e)
       in C1.Win.C1Command.C1Command.Invoke(ClickEventArgs e)
       in ep.a(C1CommandLink A_0, a A_1)
       in f.c(MouseEventArgs A_0)
       in C1.Win.C1Command.C1ToolBar.OnMouseUp(MouseEventArgs e)
       inSystem.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       in System.Windows.Forms.Control.WndProc(Message& m)
       in System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       in System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       in System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       inSystem.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       in System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       in System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       in System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       in System.Windows.Forms.Application.Run(Form mainForm)
       in Bas_Kous.frmMain.Main() στο G:\Πλιάχας Πασχάλης\Τα έγγραφά μου\ergasia1\pas\VB Net\Bas_Kous\bas_kous_agores_net2\frmMain.vb:line1
       in System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
       in System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       in Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       in System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       in System.Threading.ThreadHelper.ThreadStart()



if  i set to all controls as datasource the BASKOUSNEO2007DataSet and any table of it as datamember the form loads normally again. what am i doing wrong?
thanks for help anyway
PP

Top 50 Contributor
Posts 263
I need some additional info to investigate the problem:
1) Versions of C1 dlls used
2) How pelatesView is related with another views in viewset, does it have parent or child views?
3) What are exact property values of C1TextBox that are used to bind it to a field of pelatesView (my first impression is that a field name is not specified here).
 
TIA,
Alex
 
<albertsmus> wrote in message news:191258@test.componentone.com...
Thank you this workeed fine. I have another one question. i have a form with a c1dbnavigator, a c1truedbgrid, a c1textbox control, a c1dataviewset and i created a dataset named BASKOUSNEO2007DataSet. if i set the  datasource  of the c1dbnavigator and c1truedbgrid the c1dataviewset and as datamember a view  called "pelatesView" which i created and set none  as datasource of the c1textbox 's the form open normally. if i also set the same dataset and datamember for the c1textbox control i get the following error.
System.ArgumentException was unhandled
  Message="it's not possible to create a childlist for the field pelatesView."
  Source="System.Windows.Forms"
  StackTrace:
       in System.Windows.Forms.BindingContext.EnsureListManager(Object dataSource, String dataMember)
       σε System.Windows.Forms.BindingContext.UpdateBinding(BindingContext newBindingContext, Binding binding)
       in System.Windows.Forms.Control.UpdateBindings()
       in System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)
       in System.Windows.Forms.Control.OnParentBindingContextChanged(EventArgs e)
       in System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)
       in System.Windows.Forms.Control.OnParentBindingContextChanged(EventArgs e)
       in System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)
       in System.Windows.Forms.Control.OnParentBindingContextChanged(EventArgs e)
       in System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)
       in System.Windows.Forms.Control.set_BindingContextInternal(BindingContext value)
       in System.Windows.Forms.ContainerControl.set_BindingContext(BindingContext value)
       in System.Windows.Forms.ContainerControl.get_BindingContext()
       in System.Windows.Forms.Control.get_BindingContextInternal()
       in System.Windows.Forms.Control.get_BindingContext()
       in System.Windows.Forms.Control.get_BindingContextInternal()
       in System.Windows.Forms.Control.get_BindingContext()
       in System.Windows.Forms.Control.get_BindingContextInternal()
       in System.Windows.Forms.Control.get_BindingContext()
       in System.Windows.Forms.Control.UpdateBindings()
       in System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)
       in System.Windows.Forms.Control.OnParentBindingContextChanged(EventArgs e)
       in System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)
       in System.Windows.Forms.Control.OnParentBindingContextChanged(EventArgs e)
       in System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)
       in System.Windows.Forms.Control.AssignParent(Control value)
       in System.Windows.Forms.Control.ControlCollection.Add(Control value)
       in System.Windows.Forms.Form.ControlCollection.Add(Control value)
       in Bas_Kous.frmTest.InitializeComponent() στο G:\Πλιάχας Πασχάλης\Τα έγγραφά μου\ergasia1\pas\VB Net\Bas_Kous\bas_kous_agores_net2\frmTest.Designer.vb:line320
       in Bas_Kous.frmTest..ctor()
       in Bas_Kous.frmMain.MnuPel_Click(Object sender, ClickEventArgs e) στο G:\Πλιάχας Πασχάλης\Τα έγγραφά μου\ergasia1\pas\VB Net\Bas_Kous\bas_kous_agores_net2\frmMain.vb:line461
       in C1.Win.C1Command.C1Command.OnClick(ClickEventArgs e)
       in C1.Win.C1Command.C1Command.Invoke(ClickEventArgs e)
       in ep.a(C1CommandLink A_0, a A_1)
       in f.c(MouseEventArgs A_0)
       in C1.Win.C1Command.C1ToolBar.OnMouseUp(MouseEventArgs e)
       inSystem.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       in System.Windows.Forms.Control.WndProc(Message& m)
       in System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       in System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       in System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       inSystem.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       in System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       in System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       in System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       in System.Windows.Forms.Application.Run(Form mainForm)
       in Bas_Kous.frmMain.Main() στο G:\Πλιάχας Πασχάλης\Τα έγγραφά μου\ergasia1\pas\VB Net\Bas_Kous\bas_kous_agores_net2\frmMain.vb:line1
       in System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
       in System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       in Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       in System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       in System.Threading.ThreadHelper.ThreadStart()



if  i set to all controls as datasource the BASKOUSNEO2007DataSet and any table of it as datamember the form loads normally again. what am i doing wrong?
thanks for help anyway
PP



http://home.componentone.com/cs/forums/191253/ShowPost.aspx#191258

Top 50 Contributor
Posts 121
    1)C1.Data.C1DataSet, C1.Data.2, Version=2.0.20053.0, Culture=neutral, PublicKeyToken=900b028620cd3a1b
C1.Win.C1TrueDBGrid.C1TrueDBGrid, C1.Win.C1TrueDBGrid.2, Version=2.0.20063.60825, Culture=neutral, PublicKeyToken=75ae3fb0e2b1e0da
C1.Data.C1SchemaDef, C1.Data.2, Version=2.0.20053.0, Culture=neutral, PublicKeyToken=900b028620cd3a1b
C1.Win.C1Command.C1DockingTab, C1.Win.C1Command.2, Version=2.0.20063.18007, Culture=neutral, PublicKeyToken=e808566f358766d8
C1.Win.C1Input.C1DropDownControl, C1.Win.C1Input.2, Version=2.0.20063.31002, Culture=neutral, PublicKeyToken=7e7ff60f0c214f9a
C1.Win.C1Command.C1CommandDock, C1.Win.C1Command.2, Version=2.0.20063.18007, Culture=neutral, PublicKeyToken=e808566f358766d8
C1.Win.C1List.C1List, C1.Win.C1List.2, Version=2.1.20063.108, Culture=neutral, PublicKeyToken=6b24f8f981dbd7bc
C1.Win.C1Command.C1CommandHolder, C1.Win.C1Command.2, Version=2.0.20063.18007, Culture=neutral, PublicKeyToken=e808566f358766d8
C1.Win.C1Input.C1TextBox, C1.Win.C1Input.2, Version=2.0.20063.31002, Culture=neutral, PublicKeyToken=7e7ff60f0c214f9a
C1.Win.C1Input.C1DbNavigator, C1.Win.C1Input.2, Version=2.0.20063.31002, Culture=neutral, PublicKeyToken=7e7ff60f0c214f9a
C1.C1DataExtender.C1DataViewSet, C1.C1DataExtender.2, Version=2.0.20063.36, Culture=neutral, PublicKeyToken=7c4b5683f80b910e


2) No this is a testing form and i tried to load only the records of the pelates table with no other relation. Ofcourse in Microsoft Access database this table has relations with other tables.

3)
'C1TextBox1
        '
        Me.C1TextBox1.DataBindings.Add(New System.Windows.Forms.Binding("Value", Me.C1DataViewSet1, "pelatesView.eponimo", True))
        Me.C1TextBox1.DateTimeInput = False
        Me.C1TextBox1.DisplayFormat.Inherit = CType(((((C1.Win.C1Input.FormatInfoInheritFlags.FormatType Or C1.Win.C1Input.FormatInfoInheritFlags.NullText) _
                    Or C1.Win.C1Input.FormatInfoInheritFlags.EmptyAsNull) _
                    Or C1.Win.C1Input.FormatInfoInheritFlags.TrimStart) _
                    Or C1.Win.C1Input.FormatInfoInheritFlags.TrimEnd), C1.Win.C1Input.FormatInfoInheritFlags)
        Me.C1TextBox1.Location = New System.Drawing.Point(306, 254)
        Me.C1TextBox1.Name = "C1TextBox1"
        Me.C1TextBox1.NumericInput = False
        Me.C1TextBox1.Size = New System.Drawing.Size(194, 20)
        Me.C1TextBox1.TabIndex = 51
        Me.C1TextBox1.Tag = Nothing


'C1DataViewSet1
        '
        Me.C1DataViewSet1.DataSet = Me.BASKOUSNEO2007DataSet
        Me.C1DataViewSet1.DiagramXML = "<C1Diagram><Nodes><Node DesigningObjectName=""pelatesView""><Location X=""10"" Y=""10""" & _
            " /><Size Width=""164"" Height=""124"" /></Node></Nodes></C1Diagram>"
        Me.C1DataViewSet1.Views.Add(C1DataView1)
        '


      'BASKOUSNEO2007DataSet
        '
        Me.BASKOUSNEO2007DataSet.DataSetName = "BASKOUSNEO2007DataSet"
        Me.BASKOUSNEO2007DataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
 

Thanks for your reply. I hope this helps. Thanks again
PP
Top 50 Contributor
Posts 121
    if i don't set the datafield property of the textboxes in design mode and i set them on the load event of the form then the form loads normally.
What's your opinion about that? i'm asking you because as i read on this forum there are also other people who are interested for this component.
Thanks for help
PP
Top 50 Contributor
Posts 263
C1_AlexI replied on Sun, Feb 11 2007 7:28 AM
Unfortunately I can't reproduce this behaviour. Could you please provide me with a small sample that shows the problem.
 
TIA,
Alex
<albertsmus> wrote in message news:191307@test.componentone.com...
    if i don't set the datafield property of the textboxes in design mode and i set them on the load event of the form then the form loads normally.
What's your opinion about that? i'm asking you because as i read on this forum there are also other people who are interested for this component.
Thanks for help
PP


http://home.componentone.com/cs/forums/191277/ShowPost.aspx#191307

Top 50 Contributor
Posts 121

i send you the project and a database which you'll have to connect to.

if you run the project you'll see the error i refered to. this also hapens if i use a c1combo control.

PP i hope this helps

Top 50 Contributor
Posts 263
C1_AlexI replied on Tue, Feb 13 2007 2:55 AM
Thanks, I investigate the problem.
 
Alex
<albertsmus> wrote in message news:191457@test.componentone.com...

i send you the project and a database which you'll have to connect to.

if you run the project you'll see the error i refered to. this also hapens if i use a c1combo control.

PP i hope this helps



http://home.componentone.com/cs/forums/191422/ShowPost.aspx#191457

Top 50 Contributor
Posts 121
    Alex what about the problem? did you find out anything?
Thanks
Not Ranked
Posts 1
Warren1 replied on Mon, Oct 19 2009 10:33 PM

Others are looking for a solution to this problem.

I have found that if I do the following things work. I have a parent form where I select the MDB file, build the connection string, and then open a form with a button.

Private Sub btnBrowse_Click

MyFileForm.Dispose   ' must be used if the form has more than a grid on it

MyFileForm.DataViewSet1.Connection.Close

MyFileForm.DataViewSet1.ConnectionString = txtConnectionString.Text

MyFileForm.DataViewSet1.Connection.Open

MyFileForm.DataViewSet1.Fill  ' Note that autofetch is set to no

MyFileForm.ShowDialog

End Sub

If I don't do the MyFileForm.Dispose the DataViewSet1.Connection causes an error on MyFileForm.Show or ShowDialog for every control except the grids. It seems the Field property is affected during binding and raises an error.

I couldn't change a connection string at run-time from within the same form for any form with controls on it. If it only contained a grid then it seems to work.

There is even a problem with this procedure if you have a control on the form that has Enabled = False...It seems all bound controls must be enabled or have the fields set to ""

Hope this helps!

Page 1 of 1 (12 items) | RSS
Contact ComponentOne: 1.800.858.2739 ©1987-2010 ComponentOne LLC All Rights Reserved.