The context failed to initialize

Aug 18, 2011 at 5:40 AM

Hi all,

I am trying to read excel DDE using NDde after connecting to 127 rows it raises error for row number 128 as

---------------------------------------------------------

NDde.DdeException was unhandled
  Message=The context failed to initialize.
  Source=NDde
  Code=16390
  StackTrace:
       at NDde.Client.DdeClient.Connect() in C:\Users\Shailendra\Desktop\Source\NDde\Public\Client\DdeClient.cs:line 399
       at NDDETEST.Form1.Button1_Click(Object sender, EventArgs e) in C:\Users\Shailendra\Documents\Visual Studio 2010\Projects\NDDETEST\Form1.vb:line 51
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.ButtonBase.OnKeyUp(KeyEventArgs kevent)
       at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
       at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
       at System.Windows.Forms.Control.WmKeyChar(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(ApplicationContext context)
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       at NDDETEST.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: NDde.Foundation.DdemlException
       Message=The context failed to initialize.
       Source=System.Windows.Forms
       Code=16390
       StackTrace:
            at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
            at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
            at NDde.Advanced.DdeContext.Invoke(Delegate method, Object[] args) in C:\Users\Shailendra\Desktop\Source\NDde\Public\Advanced\DdeContext.cs:line 519
            at NDde.Advanced.DdeContext.Invoke(ThreadStart method) in C:\Users\Shailendra\Desktop\Source\NDde\Public\Advanced\DdeContext.cs:line 502
            at NDde.Client.DdeClient.Connect() in C:\Users\Shailendra\Desktop\Source\NDde\Public\Client\DdeClient.cs:line 395
       InnerException:
----------------------------------------------------------

The error is raised if i connect to each row using R1C1 fashion.If i use "R1C1:R235:C1" it works but returns all the columns but it should return only the updated column's value.

 

Can any one help me please?

 

Regards

Shailendra Kumar

9015602289

9289709298