Solved

vb.net and access db location

Posted on 2014-12-03
1
222 Views
Last Modified: 2014-12-04
I created a vehicle maintenance program and now i want to give users the option to add multiple vehicles, which i will store vehicle type and DB location in a listview.  How do i make my database sql connection connect to the selected listview item which will have the location of the database to use?  Im defaulting the db to be stored in the same localapplication folder, but im giving the user the option to name the db and name the folder, which i handle on another method.

AppDomain.CurrentDomain.SetData("DataDirectory", Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData))
        Dim con1 As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\BMW Maintenance\BMWMaintenance.accdb")

Open in new window

0
Comment
Question by:derek7467
1 Comment
 

Accepted Solution

by:
derek7467 earned 0 total points
ID: 40481317
figured it out, adding the location db to a combobox and then calling combobox.text in the sql query
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now