Wrox Programmer Forums
|
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 27th, 2003, 02:49 PM
Authorized User
 
Join Date: Jun 2003
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Default DB Path Coding

I have been trying to find a way to get the path of a DB coded into a VB6 application to no avail. I have the concept of hard coding the path but I will soon be distributing the application and the end users may not (probably will not) save the application in the path that I hard cade. To that end I need a way to code the path to search for and connect to the appropriate DB. I have looked and have so far been unable to find a solution any assistance you can provide would be greatly appreciated.

Kenny Alligood
__________________
Kenny Alligood
 
Old October 28th, 2003, 07:17 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

If the db is installed to the same directory as your app (or a subdirectory), you can just use App.Path within your vb code to locate the db.

If its somewhere else, you can try putting the path in the registry, or creating a DSN that contains the path and using that to connect to your db.

hth
Phil
 
Old October 29th, 2003, 09:33 AM
Authorized User
 
Join Date: Jun 2003
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanx for the reply Phil but I am looking for a way to connect when the DB is installed somewhere other than the folder that contains the application. Is there a routine that can search for it and connect or something similar? Thanx again and I appreciate any thoughts you may have.

Kenny Alligood
 
Old October 30th, 2003, 06:58 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

As I said before "If its somewhere else, you can try putting the path in the registry, or creating a DSN that contains the path and using that to connect to your db."
 
Old October 30th, 2003, 09:59 AM
Authorized User
 
Join Date: Jun 2003
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK. Thanx again

Kenny Alligood





Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help with path for loading Pics (app.path) Tabbasum Beginning VB 6 2 November 15th, 2007 04:57 AM
using app.path in database path and filename kd8con VB Databases Basics 2 October 25th, 2006 11:45 AM
capture file path&name and store in a access DB paul20091968 Access VBA 1 April 5th, 2006 02:17 AM
coding for how to know the virtual path of drive satya_tripathy C# 0 November 15th, 2005 01:19 AM
DB Path problem creative_eye Classic ASP Databases 1 March 7th, 2005 11:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.