Furqan Sehgal
Furqan Sehgal

Reputation: 4997

Application path problem over the network

I have an application in vb.net that runs over a network. Actually the shortcut of the exe file is shared over the LAN, so databases remain on one computer where the application has been installed. Everything works great except one thing.

The logo of this application is saved in a database, the logo is used to display on reports generated by the application. The logo file is chosen by the user, using OpenFileDialog and then saved in database. It is saved like: D:\Pictures\filename.jpg

When I run the application from the network (using shortcut that we have made to the main exe file), it gives an error on D:\Pictures\filename.jpg because this does not exist in the system that is running the shortcut.

How can I save the logo path in a way that the application can find it when run over the network?

Thanks and best regards, Furqan

Upvotes: 0

Views: 635

Answers (1)

Hand-E-Food
Hand-E-Food

Reputation: 12794

There are two options. Both assume you can make the D:\Pictures path a network share.

a. Import the picture using the share name instead of the drive name. eg. \\Server\PicturesShare\filename.jpg. This way, anyone who can access that path will have the correct path in the database.

If network paths aren't supported by the software:

b. In Windows Explorer, map a network drive on each computer. Map P: drive, or another suitable letter to \\Server\PictureShare. Do the same on the server and import the graphic via P:\filename.jpg. Everyone will access the picture through this same path.

Upvotes: 1

Related Questions