VB 2005 User Control Issue

G

Guest

I am writing a windows application using VS 2005. I have a user control that
returns customer data.

I have placed this customers user control on several forms in my
application. In the OnLoad event of the customers user control I have a data
access function that retrieves data from a database to populate the control.

The problem I have is that having the data access function in the OnLoad
event causes an error in design time for the Parent Forms. I get a "No row
at position 0" error when I try to view the parent form in design view. This
does not affect the ability of the project to build, or run.

Has anyone seen this before?

Thanks in advance for your help.
 
C

Cor Ligthert [MVP]

Sperotti,

It is bad design to mix up getting data from a server in an UI.

In my opinion is it extremely bad design to get data directly data from a
server in a user control from an UI.

I hope that you don't mind that at least I will not show that we help doing
that.

Cor
 
G

Guest

Cor Ligthert,

Well, your opinion is noted, and I would prefer in the future if you see a
message from me in this newsgroup again that you will ignore it. I really
don't care for your attitude and it is snobs like you that give Microsoft a
bad name.

First of all there is a middle-tier object connected to the user control.
If you had any people skills at all, you would have asked a question before
passing judgement. But since it is obvious that you don't have a life and
are only interested in expressing your "superiority" you are not worth
another second of my time.
 
C

Cor Ligthert [MVP]

Sperotti,

I don't have to answer your question. However if you first write this.
In the OnLoad event of the customers user control I have a data
access function that retrieves data from a database to populate the
control.

And now write this.
First of all there is a middle-tier object connected to the user control.

Maybe you can than at least for somebody else tell what you mean by that or
maybe somebody else does understand this direct completely your question and
than it is of course not needed.
I get a "No row at position 0" error when I try to view the parent form in
design view.
This does not affect the ability of the project to build, or run.

However no answers from me anymore to you, I have understood your message
that I am not so qualified as you.

Cor
 
G

Guest

On the contrary, I am sure you are very qualified. Perhaps even more
qualified than me.

You are just too arrogant to answer anyones questions here.
 

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

Top