473,748 Members | 2,625 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

22 New Member
visual basic 2005, this is my code:

Dim frminterfacea As New frmInterface
frminterfacea.S how()

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

ArgumentExcepti on [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 16943
Shashi Sadasivan
1,435 Recognized Expert Top Contributor
any change in the database?

are you sure no one changed the code / DB either?
Dec 2 '07 #2
captainphoenix
22 New Member
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 Recognized Expert Top Contributor
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
captainphoenix
22 New Member
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.Argument Exception was unhandled
Message="Cannot bind to the property or column Item Name on the DataSource.
Parameter name: dataMember"
ParamName="data Member"
Source="System. Windows.Forms"
StackTrace:
at System.Windows. Forms.BindToObj ect.CheckBindin g()
at System.Windows. Forms.BindToObj ect.SetBindingM anagerBase(Bind ingManagerBase lManager)
at System.Windows. Forms.Binding.S etListManager(B indingManagerBa se bindingManagerB ase)
at System.Windows. Forms.ListManag erBindingsColle ction.AddCore(B inding dataBinding)
at System.Windows. Forms.BindingsC ollection.Add(B inding binding)
at System.Windows. Forms.BindingCo ntext.UpdateBin ding(BindingCon text newBindingConte xt, Binding binding)
at System.Windows. Forms.Control.U pdateBindings()
at System.Windows. Forms.Control.O nBindingContext Changed(EventAr gs e)
at System.Windows. Forms.Control.O nParentBindingC ontextChanged(E ventArgs e)
at System.Windows. Forms.Control.O nBindingContext Changed(EventAr gs e)
at System.Windows. Forms.Control.O nParentBindingC ontextChanged(E ventArgs e)
at System.Windows. Forms.Control.O nBindingContext Changed(EventAr gs e)
at System.Windows. Forms.Control.s et_BindingConte xtInternal(Bind ingContext value)
at System.Windows. Forms.Container Control.set_Bin dingContext(Bin dingContext value)
at System.Windows. Forms.Container Control.get_Bin dingContext()
at System.Windows. Forms.Control.g et_BindingConte xtInternal()
at System.Windows. Forms.Control.g et_BindingConte xt()
at System.Windows. Forms.Control.g et_BindingConte xtInternal()
at System.Windows. Forms.Control.g et_BindingConte xt()
at System.Windows. Forms.Control.U pdateBindings()
at System.Windows. Forms.Control.O nBindingContext Changed(EventAr gs e)
at System.Windows. Forms.Control.O nParentBindingC ontextChanged(E ventArgs e)
at System.Windows. Forms.Control.O nBindingContext Changed(EventAr gs e)
at System.Windows. Forms.Control.O nParentBindingC ontextChanged(E ventArgs e)
at System.Windows. Forms.Control.O nBindingContext Changed(EventAr gs e)
at System.Windows. Forms.Container Control.OnCreat eControl()
at System.Windows. Forms.Form.OnCr eateControl()
at System.Windows. Forms.Control.C reateControl(Bo olean fIgnoreVisible)
at System.Windows. Forms.Control.C reateControl()
at System.Windows. Forms.Control.W mShowWindow(Mes sage& m)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.Scrollabl eControl.WndPro c(Message& m)
at System.Windows. Forms.Container Control.WndProc (Message& m)
at System.Windows. Forms.Form.WmSh owWindow(Messag e& m)
at System.Windows. Forms.Form.WndP roc(Message& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage& m)
at System.Windows. Forms.NativeWin dow.DebuggableC allback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows. Forms.SafeNativ eMethods.ShowWi ndow(HandleRef hWnd, Int32 nCmdShow)
at System.Windows. Forms.Control.S etVisibleCore(B oolean value)
at System.Windows. Forms.Form.SetV isibleCore(Bool ean value)
at System.Windows. Forms.Control.S how()
at Mando_Books_Sal es_Interfae.frm EmployeeID.btnO K1_Click(Object sender, EventArgs e) in C:\Documents and Settings\mike\D esktop\Mando_Bo oks_Sales_Inter fae\Mando_Books _Sales_Interfae \frmEmployeeID. vb:line 21
at System.Windows. Forms.Control.O nClick(EventArg s e)
at System.Windows. Forms.Button.On Click(EventArgs e)
at System.Windows. Forms.Button.Pe rformClick()
at System.Windows. Forms.Form.Proc essDialogKey(Ke ys keyData)
at System.Windows. Forms.TextBoxBa se.ProcessDialo gKey(Keys keyData)
at System.Windows. Forms.Control.P reProcessMessag e(Message& msg)
at System.Windows. Forms.Control.P reProcessContro lMessageInterna l(Control target, Message& msg)
at System.Windows. Forms.Applicati on.ThreadContex t.PreTranslateM essage(MSG& msg)
at System.Windows. Forms.Applicati on.ThreadContex t.System.Window s.Forms.UnsafeN ativeMethods.IM soComponent.FPr eTranslateMessa ge(MSG& msg)
at System.Windows. Forms.Applicati on.ComponentMan ager.System.Win dows.Forms.Unsa feNativeMethods .IMsoComponentM anager.FPushMes sageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows. Forms.Applicati on.ThreadContex t.RunMessageLoo pInner(Int32 reason, ApplicationCont ext context)
at System.Windows. Forms.Applicati on.ThreadContex t.RunMessageLoo p(Int32 reason, ApplicationCont ext context)
at System.Windows. Forms.Applicati on.Run(Applicat ionContext context)
at Microsoft.Visua lBasic.Applicat ionServices.Win dowsFormsApplic ationBase.OnRun ()
at Microsoft.Visua lBasic.Applicat ionServices.Win dowsFormsApplic ationBase.DoApp licationModel()
at Microsoft.Visua lBasic.Applicat ionServices.Win dowsFormsApplic ationBase.Run(S tring[] commandLine)
at Mando_Books_Sal es_Interfae.My. MyApplication.M ain(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.v b:line 81
at System.AppDomai n.nExecuteAssem bly(Assembly assembly, String[] args)
at System.AppDomai n.ExecuteAssemb ly(String assemblyFile, Evidence assemblySecurit y, String[] args)
at Microsoft.Visua lStudio.Hosting Process.HostPro c.RunUsersAssem bly()
at System.Threadin g.ThreadHelper. ThreadStart_Con text(Object state)
at System.Threadin g.ExecutionCont ext.Run(Executi onContext executionContex t, ContextCallback callback, Object state)
at System.Threadin g.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 Recognized Expert Top Contributor
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
2262
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 the dataset. The datagrid contains several additional columns that are not seen here because they are automatically generated and bound to the dataset. All columns work except the second image column, which attempts to bind to the dataset. When...
2
13595
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='<%# DataBinder.Eval(Container.DataItem, "item.Name") %>' ></asp:Label> </ItemTemplate> The problem, in my opinion, is that in my DataSet I am using alias
1
1157
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
1330
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 = command.ExecuteReader(); while (PerReader.Read()) { int address_id = PerReader.GetOrdinal("address_id");
3
1377
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 andsave it to the database. I get the "cannot bind to columnpermitnumber on datasource" error, or if I add the tablename.column name into the binding, a permit number that alreadyexists pops up. Here is my code: Dim dbConn As...
3
8700
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 response.write I can see the dates fine, what is causing this error? code: dYear.DataSource = dsYearofSales.Tables; string strYearofSales = dsYearofSales.Rows.tostring(); dYear.DataTextField =
1
5734
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 name: dataMember" I've been looking around and some people have been using the currency manager. If this is a solution could someone show me how I can add it to my code to make my binding work correctly. thanks Public Class Form1
4
2002
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 database and all associated stored procedures, my textbox bound to the newly changed field will not populate and I receive the error below. Unhandled Exception: System.Data.SqlClient.SqlException: Error converting data type varchar to bigint ...
4
1635
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 Address. Address has a property Street.
0
8832
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9561
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9332
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9254
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6799
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4608
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3316
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.