PC Review


Reply
Thread Tools Rate Thread

Database-Dataenvironment.

 
 
Rado
Guest
Posts: n/a
 
      6th Oct 2003
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.


 
Reply With Quote
 
 
 
 
Kirk
Guest
Posts: n/a
 
      6th Oct 2003
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.
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to work around DataEnvironment Filter that includes an apostrophe? Mike Scirocco Microsoft Access Macros 1 4th Oct 2006 07:32 AM
Dataenvironment for .Net Allcomp Microsoft VB .NET 2 3rd Jun 2005 04:51 PM
Use DataEnvironment in VB.NET BraveHeart Microsoft VB .NET 1 2nd Mar 2004 02:15 PM
Database-Dataenvironment. Rado Microsoft ADO .NET 1 6th Oct 2003 11:23 AM
DATAENVIRONMENT Rado Microsoft VB .NET 2 4th Oct 2003 03:02 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:36 AM.