English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Can you please give me step-by-step instructions on linking a Data Environment in VB 6.0 to a database in Access and tables and then linking the Data Report to the Data Environment? Please??

2007-10-12 22:52:16 · 2 answers · asked by Anonymous in Computers & Internet Programming & Design

2 answers

From the main tool bar click icon to open the Dataview window
From the Dataview window click icon "Add Data Environment" to current project.

Note that you will now have a DE in your Project explorer
From the DataEnv1 window Right Click Connection1 and select properties

From the properties window select a provider. Access uses the JET engine select the proper version either 3.51 or 4.0 for you database click next
Select your access database and test teh connection then click OK

Right Click Connection1 from within the Dataenviroment and click properties

Source of Data : Select TABLE from the dropdown list
And Select your Table from the other drop down list
Change the commandName to something meaningful like
cmdTblNameofTable (i.e. cmdTblStudents)

Click OK and this completes the config of the Data Env

Goto the Project Explorere and right click Designers and click Add then select Data Report

On data report properties select the DataSource which will be the data environment and then select the Datamember which will be the command to get the table data. Both of these are dropdowns and will be obvious what to choose.

With the windows for the Data environment and Data rreport both visible (you may have to reduce window sizes or tile the windows ) you can drag and drop the Table fields from the DataEnv onto the Data report

To view the report call the show method of the DE. The easiest way to do this is from a command event handler on a form

2007-10-13 01:04:30 · answer #1 · answered by MarkG 7 · 0 0

Get a book on Visual Basic and look it up!

2007-10-12 23:20:53 · answer #2 · answered by Charlie Babbage 5 · 0 1

fedest.com, questions and answers