How to Add Data Enviroment in Vb6

This is the Basic way on how to add Data Environment on your Visual Basic 6.0 and adding
some commands for your database data manipulation for data reporting

1.) You must go to Project>More Active X > Data Enviroment
like shown in the image below






















2.) then it will Look like this









3.) to create a connection through your database just simply  right click on a connection then
click Properties



















4.) Then the Data link Properties pop-up for choosing the driver of what database type
you used,on this situation i use Access so i choose   Microsoft.Jet.Oledb Provider like
shown on the image below: then click Next






















5.) at the Select or enter Database Name just click the buttonto browse your database
directory like shown below






















at this case i choose the default database on what visual basic 6.0 have during the
installation process the Biblio and Nwind database select one like i did the press open

6.) after that press Test Connection button like in the image below

    




















it will show you the message  Test connection Succeeded

7.) for adding a Command to view the   Table or the Views or the Stored Procedure 
on your Database  just right click the connection then press Add Command

  
















8.) then the Command you added is shown in Hierarchy view

    









9.) To link the data on your command just follow the step below






















right click the Command>Properties 

10.) then Command Proprieties appear then type the appropriate   fields like i
did in image below






















Command Name:(the name of your command)
Connection:(the Connection name)
Database Object:(Table)

Note: in the Database Object there is a type of object you want to display like,Views,
Stored Procedure,Tables but now i want the Table to link on my Command

Object Name:(this is Tables stored on your database)then click Apply

11.) then it will look like below it shown in Hierarchy view










Hope this will help you a lot!!!
These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

Leave a comment

Copyright @ Codes-47.Blogspot.Com. Powered by Blogger.