By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,289 Members | 1,277 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,289 IT Pros & Developers. It's quick & easy.

linking images in a split database

P: n/a
Hi everyone

I will be having a split database, running on 2 computers via mapped
drive.

computer "A" will have one front end and the back end located in c:
\mydatabse
2 tables have links to many images stored as c:\mydatabse\images
\images.jpg
so computer A has no problem accessing the picture

computer B will be mapped to the database folder on computer A as
drive G

how is it possible for computer B to link to the images, as his front
end will be looking for images on drive C

keeping in mind the images are changing all the time but always in the
same folder

I have not done this before, and read few posts which none I found
could solve my problem

any directions will be appreciated

Apr 30 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Map the drive letter "G" on computer "A" to the shared folder, so computer
"A" and "B" has the same data path.

"najimou" <ij********@hotmail.comwrote in message
news:11**********************@o5g2000hsb.googlegro ups.com...
Hi everyone

I will be having a split database, running on 2 computers via mapped
drive.

computer "A" will have one front end and the back end located in c:
\mydatabse
2 tables have links to many images stored as c:\mydatabse\images
\images.jpg
so computer A has no problem accessing the picture

computer B will be mapped to the database folder on computer A as
drive G

how is it possible for computer B to link to the images, as his front
end will be looking for images on drive C

keeping in mind the images are changing all the time but always in the
same folder

I have not done this before, and read few posts which none I found
could solve my problem

any directions will be appreciated

May 1 '07 #2

P: n/a
On May 1, 11:33 am, "paii, Ron" <p...@packairinc.comwrote:
Map the drive letter "G" on computer "A" to the shared folder, so computer
"A" and "B" has the same data path.

"najimou" <ijandar...@hotmail.comwrote in message

news:11**********************@o5g2000hsb.googlegro ups.com...
Hi everyone
I will be having a split database, running on 2 computers via mapped
drive.
computer "A" will have one front end and the back end located in c:
\mydatabse
2 tables have links to many images stored as c:\mydatabse\images
\images.jpg
so computer A has no problem accessing the picture
computer B will be mapped to the database folder on computer A as
drive G
how is it possible for computer B to link to the images, as his front
end will be looking for images on drive C
keeping in mind the images are changing all the time but always in the
same folder
I have not done this before, and read few posts which none I found
could solve my problem
any directions will be appreciated- Hide quoted text -

- Show quoted text -
You could also use the Subst command in computer A. Run the following
command from a command prompt "subst /?" it will show you how it
works.

I always use it to resolve issues like the one you have.

May 2 '07 #3

P: n/a
bob


It's a good idea to only store the filename in the database (or the varying part of the relative path,
if the images are stored in multiple directories), then construct the full path at runtime when you need
to display the image. If the images are stored in a subdirectory of the database location you can obtain
the path to the database using code then build the full path to the image - then the images will be found
whether the database is accessed on a local drive, via a mapped share, or via a unc path, without needing
additional configuration.

The following article describes how to get the path to the database, including a method to get the path
to the back-end in a split design (see option 3):

http://tinyurl.com/y3vzzp
This article discusses using relative paths in more detail:

http://tinyurl.com/ylvvsk

And this article shows how to parse the filename from a full path:

http://tinyurl.com/2svnog
Sample code for using an image control on a form is as follows (watch for line wrap - see the code in the
articles above if in doubt):

'Filename' is a field containing the filename (only).
'Image1' is an image control.
'tblLinked' is a linked table in the back-end database.
The image files are stored in a subdirectory 'images' relative to the location of the back-end.
Private Sub Form_Current()
Dim ImagePath As String
ImagePath = GetImagePath & [Filename]

If Len([Filename]) 0 And Len(Dir(ImagePath)) 0 Then
Image1.Picture = ImagePath
Else
Image1.Picture = ""
End If
End Sub
Public Function GetImagePath() As String
GetImagePath = GetDBPath & "images\"
End Function
Public Function GetDBPath() As String
Dim strFullPath As String
strFullPath = Mid(DBEngine.Workspaces(0).Databases(0).TableDefs( "tblLinked").Connect, 11)
GetDBPath = Left(strFullPath, InStrRev(strFullPath, "\"))
End Function


najimou <ij********@hotmail.comwrote:
>Hi everyone

I will be having a split database, running on 2 computers via mapped
drive.

computer "A" will have one front end and the back end located in c:
\mydatabse
2 tables have links to many images stored as c:\mydatabse\images
\images.jpg
so computer A has no problem accessing the picture

computer B will be mapped to the database folder on computer A as
drive G

how is it possible for computer B to link to the images, as his front
end will be looking for images on drive C

keeping in mind the images are changing all the time but always in the
same folder

I have not done this before, and read few posts which none I found
could solve my problem

any directions will be appreciated
May 2 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.