Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding a dataenvironment - connecting to a access database

Status
Not open for further replies.

Dapper

Programmer
Nov 2, 2003
74
0
0
GB
in the exe i have added a dataenvironment.

i have completely forgetton how to connect a database to it like access.

I thought you right click on dataenvironment then left clicked on properties - but now when i do this i get an error message saying missing data source locator.

please help

many thanks

I might not be able to reply back straight away as may be back on the road shortly. help and guidence is appreciated
 
Hi

I to have had many problems with data environments but here goes

Add data environment to your project
for now leave the default name

Right click Connection1 and select properties

select microsoft jet either 3.5 or 4 depending on OS and MDAC installed

click next then select your database and click test connection do not worry about any other fields unless you have a password set go to the advanced tab and ensure that share deny none is selected then OK to form

Now right click connection1 and select add command

richt click command1 and select properties

set you database object to table

and object name to the table you want

Then go to the advanced tab set lock to batch optomistic and you are now able to add fields from the dataenvironment to your form by simple drag and drop.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top