Solved

vb.net and access db location

Posted on 2014-12-03
1
231 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how the fundamental information of how to create a table.

809 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