A question about dataset loading

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all!
So I get the following error when I try to update my dataset from a windows
form. "Can't create a child list for field 'TableName'" This is the error I
get in my application, I found this error in the KB (Article ID : 816799 )
The error is built by design, and the cause is from in my case deleating the
table that was bound to a control. They do have a fix or a workaround by
modifying a line of code. My problem is I can't find the line of code they
speak of. The code is in the form, In the InitializeComponent procedure of
the Windows Form Designer generated code region, locate the following
statement in the Form1 code:

Microsoft Visual Basic .NET codeMe.Controls.AddRange(New
System.Windows.Forms.Control() {Me.TextBox2, Me.TextBox1, Me.ListBox1})

If i could find this, i could modify it, and hopefully it will fix my
problem. Of course, I could be totally off base, and this has nothing to do
with anything that I'm doing. Which means I will post again, LOL. If
somebody could take a peak at this KB, and see if this seems right, and tell
me what I'm missing.

As always, TIA!

Rudy
 
Rudy,

The article you show is in my opinion a very bad article. It says that is
about beta (and probably the solution is beta), than it tells it applies to
all current non beta versions as well.

I do not know if the error still exist however it is possible. The addrange
is as far as I know not used as this, all controls are seperatly added to
the form.

Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.ComboBox1)

What you can do is check if that exist in the designer generated code and
the problem still exist like it is described in the article.

I hope it helps something?

Cor
 
Hi Cor!

I'm glad I'm not the only one who found this confusing. I did find the
single controls like you have. I have looked at them, and they seem
consistent to what i have on my form. I even deleted and changed the names
of some controls, and it changes correctly in the code. I also built a new
test application, and try to recreate the problem, but everything was fine.
I have deleted and added DataSets and connections and controls in the process
of learning and trying new things to get a better understanding of what I'm
doing. I think the best thing to do is to start with a new application and
rewrite everything. I have a better understanding of what I'm doing thanks
to you and others on this forum for giving me pointers. At least I can set
my connection and Dataset correctly the first time, and not have to keep
changing things. I find it odd that you don't have the flexablitiy to change
things like this. Thanks for all your advise!

Rudy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top