VBCode.com has a lot of great vb code samples.
What exactly do you want to do with a DataEnvironment?
You could use a DataEnvironment to show information from a database without writing a single line of code.
- Open (or create) your project
- In project explorer, right-click on the project, and select “Add” -> “DataEnvironment”
- In the new DataEnvironment, right-click on the automatically created connection (Connection1)
- Choose the appropriate OLE DB Provider (for example Microsoft Jeg 4.0 …) and click “next”
- Enter server and user names and password, and click on “Test connection”
- A success message should appear (“Test connection succeeded”), click Ok
- Click Ok to close the connection properties window.
- Right click on the connection, and select “Add Command”
- In the properties window (of the command) enter a sql select statement in the “CommandText” property
- Select “adCmdText” in the CommandType property
- From the dataEnvironment window, drag and drop the command (Command1) to your form.
- Run the project.
For more information, have a look at the following page: About the Data Environment Designer