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
|
|