<a href=”http://www.vbcode.com/”>VBCode.com</a> has a lot of great vb code samples.
This <a href=”http://www.dbu2000.com/vb.htm”>site</a> has code samples using VB6 and the VB Data Environment Designer. There is also ADO code samples (accessing SQL DBs in this case) here as well.
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 mor information, have a look at the following page:
<a href=”http://msdn.microsoft.com/en-us/library/aa231245(VS.60).aspx”>About the Data Environment Designer (msdn.microsoft.com)</a>