473,503 Members | 2,166 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How To Get Frontend and Backend UNC Paths?

I'm using the following to get the FE and BE database paths.

FEPath = DBEngine.Workspaces(0).Databases(0).Name

BEPath = Mid([DBEngine].[Workspaces](0).[Databases](0).[TableDefs]
("Admin").[Connect], 11)

These work well but they only retrieve the Drive Letter paths. Is
there a simple way to retrieve the UNC paths?


Jul 17 '08 #1
6 4246
On Wed, 16 Jul 2008 17:53:12 -0700 (PDT), Wayne <cq*******@volcanomail.com>
wrote:
>I'm using the following to get the FE and BE database paths.

FEPath = DBEngine.Workspaces(0).Databases(0).Name

BEPath = Mid([DBEngine].[Workspaces](0).[Databases](0).[TableDefs]
("Admin").[Connect], 11)

These work well but they only retrieve the Drive Letter paths. Is
there a simple way to retrieve the UNC paths?
It depends on how the table was linked initially.
If the table was linked using a drive letter, the connect string will return the
drive letter.
If the table was linked using a UNC path, the connect string will return the UNC
path.

There is no inbuilt conversion function, it is just a text string.
Wayne Gillespie
Gosford NSW Australia
Jul 17 '08 #2
Wayne wrote:
I'm using the following to get the FE and BE database paths.

FEPath = DBEngine.Workspaces(0).Databases(0).Name

BEPath = Mid([DBEngine].[Workspaces](0).[Databases](0).[TableDefs]
("Admin").[Connect], 11)

These work well but they only retrieve the Drive Letter paths. Is
there a simple way to retrieve the UNC paths?
This should help. http://www.mvps.org/access/api/api0003.htm

Eye of the Tiger
http://www.youtube.com/watch?v=eMsBU0zvMqc
Jul 17 '08 #3
Thanks for the help Wayne and Salad.

Jul 17 '08 #4
JvC
Wayne,

You can use CurrentDb.Name to get the FEPath. It's a bit shorter!

Wayne expressed precisely :
I'm using the following to get the FE and BE database paths.

FEPath = DBEngine.Workspaces(0).Databases(0).Name

BEPath = Mid([DBEngine].[Workspaces](0).[Databases](0).[TableDefs]
("Admin").[Connect], 11)

These work well but they only retrieve the Drive Letter paths. Is
there a simple way to retrieve the UNC paths?

Jul 17 '08 #5
"Wayne" <cq*******@volcanomail.comwrote in message
news:dd**********************************@l42g2000 hsc.googlegroups.com...
I'm using the following to get the FE and BE database paths.

FEPath = DBEngine.Workspaces(0).Databases(0).Name

BEPath = Mid([DBEngine].[Workspaces](0).[Databases](0).[TableDefs]
("Admin").[Connect], 11)

These work well but they only retrieve the Drive Letter paths. Is
there a simple way to retrieve the UNC paths?
Yes. All it requires is a little copy 'n paste from here:

http://www.smccall.demon.co.uk/MiscApi.htm#UNCpath
Jul 17 '08 #6
JvC <jo******@earthlink.netwrote in
news:Pp*****************@newsfe04.iad:
You can use CurrentDb.Name to get the FEPath. It's a bit shorter!
And more reliable, since it can never return anything but the
database open in the Access UI. DBEngine(0)(0) can in rare
circumstances (such as just after running a wizard) return a
different database.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jul 17 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2510
by: w | last post by:
Hello all!!! For a year and a half now, we have been developing different Access 2000 applications. Most of them are access frontend and access backends. Some of them have SQL server 2000 as a...
1
2338
by: matt bourke | last post by:
Hi, Can you please tell me what the advantage is of using an access backend with a VB frontend OVER access as a frontend and backend. M
16
2175
by: Wayne Aprato | last post by:
I have several Access 97 databases which are split into front end and back end running off a server. The front end mde is shared by 2 or 3 - absolute maximum of 6 concurrent users. This scenario...
3
2071
by: DD | last post by:
Hi I have a split database, that is packaged and used in a runtime enviroment. I want to make it easier for the user, a button on the frontend "Export Backend" They can click on the button...
2
2345
by: Sukkel | last post by:
When I define relations in the Backend of my Database, everything works fine. I get these funny lines (with 1 and "OO") between the fields of the different table that indicate a one to many...
42
5581
by: PC Datasheet | last post by:
I have zero experience with using a SQL database for a backend and Access for a frontend. I have some questions: 1. Does an SQL database have tables? 2. How does Access connect to the data in...
5
1789
by: ordy62 | last post by:
I split a database to a FE and BE but the issue is the network shares. I have several groups that need to view this database but the network paths to database are different for example. ...
9
2182
by: philelpko | last post by:
Good Morning all, Lost once again which is becoming a common occurance atm. My database has successfully been broken into a frontend and a backend db. A problem has now arisen as it has become...
15
1622
by: Michiel Rapati-Kekkonen | last post by:
my understanding is that you can copy a backend on condition that all recordsets are closed. But it is not what I experience. Is there a way to find out what keeps the backend connected? (maybe I...
0
7205
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7287
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7349
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5594
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4688
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3168
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
746
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
399
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.