C#异常 用ComboBox下拉单捆绑数据库数据的异常

未处理 System.ArgumentException
Message="无法创建字段 Cusomers 的子列表。"
Source="System.Windows.Forms"
StackTrace:
在 System.Windows.Forms.BindingContext.EnsureListManager(Object dataSource, String dataMember)
在 System.Windows.Forms.BindingContext.UpdateBinding(BindingContext newBindingContext, Binding binding)
在 System.Windows.Forms.Control.UpdateBindings()
在 System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)
在 System.Windows.Forms.Control.OnParentBindingContextChanged(EventArgs e)
在 System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)
在 System.Windows.Forms.ContainerControl.OnCreateControl()
在 System.Windows.Forms.Form.OnCreateControl()
在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
在 System.Windows.Forms.Control.CreateControl()
在 System.Windows.Forms.Control.WmShowWindow(Message& m)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ScrollableControl.WndProc(Message& m)
在 System.Windows.Forms.ContainerControl.WndProc(Message& m)
在 System.Windows.Forms.Form.WmShowWindow(Message& m)
在 System.Windows.Forms.Form.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
在 System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
在 System.Windows.Forms.Control.SetVisibleCore(Boolean value)
在 System.Windows.Forms.Form.SetVisibleCore(Boolean value)
在 System.Windows.Forms.Control.set_Visible(Boolean value)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.Run(Form mainForm)
在 ch63.Program.Main() 位置 C:\Documents and Settings\nicket\My Documents\Visual Studio 2005\Projects\ch63\ch63\Program.cs:行号 17
在 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()

怎么解决?

第1个回答  2007-07-23
应该是你的ComboBox数据关联有问题。查看一下你写的sql语句或者设置。
相似回答