What is the best way to handle path to different objects in the database.

  • Thread starter Thread starter Tony Johansson
  • Start date Start date
T

Tony Johansson

Hello!

What is the best way to handle path to a textfile in a database and a path
to an image in the database.
I mean if I use a local SqlCe database and make a zip file of the project it
must be possible to run the project
when the project is unzipped.

//Tony
 
What is the best way to handle path to a textfile in a database and a path
to an image in the database.
I mean if I use a local SqlCe database and make a zip file of the project it
must be possible to run the project
when the project is unzipped.

One way must be to unpack the database in the same dir as the
exe and have the code look for it in the dir of the exe.

Something like:

Path.Combine(Path.GetDirectoryName(Environment.GetCommandLineArgs()[0]),
"foobar.sdf")

Arne
 
Back
Top