473,387 Members | 1,365 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

WinApp : Cannot bind to the property or column Item Name on the DataSource

visual basic 2005, this is my code:

Dim frminterfacea As New frmInterface
frminterfacea.Show()

this loaded up the form frminterface until today. it worked fine yesterday, no change in code, now i get this message at runtime:

ArgumentException [sic] was unhandled
Cannot bind to the property or column Item Name on the DataSource.
Parameter name: dataMember

what went wrong?
Dec 2 '07 #1
5 16920
Shashi Sadasivan
1,435 Expert 1GB
any change in the database?

are you sure no one changed the code / DB either?
Dec 2 '07 #2
im not sure what you mean. There were no code changes. the part of the code that gets highlighted is "form.show". would this be related to any issues with the form it's supposed to load up, or is this somehow just the wrong code?
Dec 3 '07 #3
Shashi Sadasivan
1,435 Expert 1GB
The issue would be that you would have entered some data into the database..
and the data is causing some exceptions (the data, not the scehma).

the show would throw an exception, but if you look at the stack trace it would lead to the Form load event handler for that form.

Try debugging it, and check where in the form load the application throws the exception.

cheers
Dec 3 '07 #4
ok i think i see where this is going. i did change the names of some of the datasource names, but none of them were actually used. would that affect it?


this is what got attached to my clipboard when i clicked "copy extension detail to the clipboard":


System.ArgumentException was unhandled
Message="Cannot bind to the property or column Item Name on the DataSource.
Parameter name: dataMember"
ParamName="dataMember"
Source="System.Windows.Forms"
StackTrace:
at System.Windows.Forms.BindToObject.CheckBinding()
at System.Windows.Forms.BindToObject.SetBindingManage rBase(BindingManagerBase lManager)
at System.Windows.Forms.Binding.SetListManager(Bindin gManagerBase bindingManagerBase)
at System.Windows.Forms.ListManagerBindingsCollection .AddCore(Binding dataBinding)
at System.Windows.Forms.BindingsCollection.Add(Bindin g binding)
at System.Windows.Forms.BindingContext.UpdateBinding( BindingContext newBindingContext, Binding binding)
at System.Windows.Forms.Control.UpdateBindings()
at System.Windows.Forms.Control.OnBindingContextChang ed(EventArgs e)
at System.Windows.Forms.Control.OnParentBindingContex tChanged(EventArgs e)
at System.Windows.Forms.Control.OnBindingContextChang ed(EventArgs e)
at System.Windows.Forms.Control.OnParentBindingContex tChanged(EventArgs e)
at System.Windows.Forms.Control.OnBindingContextChang ed(EventArgs e)
at System.Windows.Forms.Control.set_BindingContextInt ernal(BindingContext value)
at System.Windows.Forms.ContainerControl.set_BindingC ontext(BindingContext value)
at System.Windows.Forms.ContainerControl.get_BindingC ontext()
at System.Windows.Forms.Control.get_BindingContextInt ernal()
at System.Windows.Forms.Control.get_BindingContext()
at System.Windows.Forms.Control.get_BindingContextInt ernal()
at System.Windows.Forms.Control.get_BindingContext()
at System.Windows.Forms.Control.UpdateBindings()
at System.Windows.Forms.Control.OnBindingContextChang ed(EventArgs e)
at System.Windows.Forms.Control.OnParentBindingContex tChanged(EventArgs e)
at System.Windows.Forms.Control.OnBindingContextChang ed(EventArgs e)
at System.Windows.Forms.Control.OnParentBindingContex tChanged(EventArgs e)
at System.Windows.Forms.Control.OnBindingContextChang ed(EventArgs e)
at System.Windows.Forms.ContainerControl.OnCreateCont rol()
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
at System.Windows.Forms.ContainerControl.WndProc(Mess age& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.SafeNativeMethods.ShowWindow( HandleRef hWnd, Int32 nCmdShow)
at System.Windows.Forms.Control.SetVisibleCore(Boolea n value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.Show()
at Mando_Books_Sales_Interfae.frmEmployeeID.btnOK1_Cl ick(Object sender, EventArgs e) in C:\Documents and Settings\mike\Desktop\Mando_Books_Sales_Interfae\M ando_Books_Sales_Interfae\frmEmployeeID.vb:line 21
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.PerformClick()
at System.Windows.Forms.Form.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.TextBoxBase.ProcessDialogKey( Keys keyData)
at System.Windows.Forms.Control.PreProcessMessage(Mes sage& msg)
at System.Windows.Forms.Control.PreProcessControlMess ageInternal(Control target, Message& msg)
at System.Windows.Forms.Application.ThreadContext.Pre TranslateMessage(MSG& msg)
at System.Windows.Forms.Application.ThreadContext.Sys tem.Windows.Forms.UnsafeNativeMethods.IMsoComponen t.FPreTranslateMessage(MSG& msg)
at System.Windows.Forms.Application.ComponentManager. System.Windows.Forms.UnsafeNativeMethods.IMsoCompo nentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.Run MessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.Run MessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationCo ntext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.Run(String[] commandLine)
at Mando_Books_Sales_Interfae.My.MyApplication.Main(S tring[] 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.Run UsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context( Object state)
at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()


i don't know if this is what you are looking for, but i remember there was some other error list but i can't remember how i came across it. how do i fix this?
Dec 3 '07 #5
Shashi Sadasivan
1,435 Expert 1GB
Was the datasource name changed which is bound to the contriols?
What about re binding the controls to your datasource!! have you tried that ?
Dec 3 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Jim Hammond | last post by:
The code below implements two datagrid columns that display images. The first column is just a test that always displays the same image directly from a file. The second column pulls the image from...
2
by: Georg Mayer | last post by:
Hi, I am trying to display data from a DataSet in a Repeater Control. My item-template (just an example) is like this: <ItemTemplate> <td> <asp:Label Runat="server" Text='<%#...
1
by: Grey | last post by:
How can I get the column header name when user click on the column for sorting purpose?? Million thanks
4
by: needin4mation | last post by:
Hi, using C#, I have to do this to get the database columns in a reader. Can it be done in one step?: OdbcCommand command = new OdbcCommand(sqlSelectPersonal, conn); OdbcDataReader PerReader...
3
by: Lori Markle via .NET 247 | last post by:
(Type your message here) Hi, I'm having a problem with binding a textbox to a dataset. Cananybody figure out what's going on here? I simply want to update a record. Type in a permit number...
3
by: John | last post by:
I'm getting this error when i'm trying to databind my dataset to a dropdown: DataBinding: 'System.Data.DataRowView' does not contain a property with the name '12/12/2003' but if I do a...
1
by: mike11d11 | last post by:
Can anyone Tell me why this code doesnt let me bind a Textbox field to the Account# column in my SQL table. It says "Cannot bind to the property or column ACCOUNT# on the DataSource. Parameter...
4
by: Matt Fondoble | last post by:
I have a form with multiple textboxes, checkboxes and comboboxes bound to a dataset in VB 2003. I was forced to change the database structure of a field from bigint to char. After changing the...
4
by: Pieter | last post by:
Hi, I want to bind a proeprty of a child object to a DataGridView, but it doesn't work. For instance: Imagen that I have an object Company, and this object company has a child object...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.