Rado,
If I understand correctly, you want a design-time command that you can share
across multiple forms. Unfortunately, you cannot do this in vb.net. The
object-orientedness of vb.net does not allow it. the closest you can get to
that is to place a public command object in a module and use it from code in
each of your forms. This does not provide the design-time interface you
probably want, but it does allow for a single command object used throughout
the application.
This method is not a very good object-oriented solution, but it will fulfill
the basic need you have.
Kirk Graves
"Rado" <r-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello.
> I have One problem.
> Whan I make database program in Visual Basic 6 which has some Forms. I
make
> Dataenvironment. There I make connection to my database. In command I
select
> table or write SQL comand.And Now I can acces to this tabel/ created new
> table with SQL command/. Such that, when I put some textbox,datagrid to
> first form I can bind this components with created Dataenvironment
command.
> When I put some commponents to second Form, thirs
> form...................................
> I can do same thing, so I can bind with created Dataenvironment command.
> How Can I make it in Visual Basic.NET.
> BEcause when I work with databases, I can make one connection in Server
> Explorer, but I must make Dataadapter/Dataset/ for each Form.
>
> Have any Idea how Can i do it, that I created one conection, once I write
> Sql command, and on the this conecntion-command I should be accses from
each
> form ?
> Thank You very much for your answer.
>
>
|