Solved

Maximum fields I can save in Bindingsource

Posted on 2014-02-04
2
325 Views
Last Modified: 2014-02-11
Experts,

I have run into a maximum number of fields I can save in VB.net bindingsource, using Access 2007 table.

I've use this code:

Try
            Me.Validate()
            Me.TblFlange14CalcBindingSource.EndEdit()
            Me.TblFlange14CalcTableAdapter.Update(Me.JobsDataSet.TblFlange14Calc)
            ' MsgBox("Update successful")
            Beep()

        Catch ex As Exception
            MsgBox("Update failed")
        End Try

I first thought I had an illegal field name, but have since found that if I try to save more than about 97 fields, it fails.

If I go into DataSources, use the wizard and remove one field (any field) from the Dataset (i.e., uncheck one box so that field is not included), the above code will save changes.

I have included Access database to demonstrate.
Experts-exchange blocks upload of the vb.net project Dataset files, but I will email to you directly if requested.

I cannot believe 96-97 fields exceed some limit of fields that can be edited and saved back.

Any help MUCH appreciated!

-Larry
0
Comment
Question by:Larry Biederman
  • 2
2 Comments
 

Author Comment

by:Larry Biederman
ID: 39833441
Here is the access database.  Use Test2.zip and see test.mdb
Test.zip
Test2.zip
0
 

Accepted Solution

by:
Larry Biederman earned 0 total points
ID: 39851747
I have found an answer and work around. For whatever reason this code can only save back about 95 fields.  Beyond that, I used a commandbuilder and saved back as 2 recordsets and then it works.

Try
            Me.Validate()
            Me.TblFlange14CalcBindingSource.EndEdit()
            Me.TblFlange14CalcTableAdapter.Update(Me.JobsDataSet.TblFlange14Calc)
            ' MsgBox("Update successful")
            Beep()

        Catch ex As Exception
            MsgBox("Update failed")
        End Try
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now