path of an opened dbf file.

Issues and Discussions related to Harbour

Moderator: Rathinagiri

User avatar
vierirom
Posts: 22
Joined: Sat Aug 20, 2011 3:49 pm
Location: Rome, Italy

path of an opened dbf file.

Post by vierirom »

Hi to everybody
Is there anybody who knows how to know the full path of an opened dbf file ?
I am looking for a function like this:
filepath := dbfpath(alias())

Thank you
Vieri
Javier Tovar
Posts: 1275
Joined: Tue Sep 03, 2013 4:22 am
Location: Tecámac, México

Re: path of an opened dbf file.

Post by Javier Tovar »

Hola vierirom,

#define DirActual GetCurrentFolder() +"\"


Public ccDirData := DirActual + "Data\"


Espero te sirva

Saludos
User avatar
vierirom
Posts: 22
Joined: Sat Aug 20, 2011 3:49 pm
Location: Rome, Italy

Re: path of an opened dbf file.

Post by vierirom »

Hola Javier
Thank you for your answer.
I need to find the actual path of an already opened dbf file.
If I write:
use mydbf alias mydbf new.
It tryes to open the dbf in set(_set_default)
If it doesn't find the file in (_default) it tryes to find it the path stream... (set(_set_path))
so.. if the file is opened I'm not sure where ACTUALLY the file has been found.
So I need the function to find the actual path of the already opend dbf file.

Thank you for your cooperation
Vieri
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

path of an opened dbf file - FULLPATH

Post by Pablo César »

Hi Vieri,

you will find this usefull:

Code: Select all

#include "Dbinfo.ch"

use mydbf alias mydbf new
MsgDebug( dbInfo( DBI_FULLPATH ) )
Rgds
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
vierirom
Posts: 22
Joined: Sat Aug 20, 2011 3:49 pm
Location: Rome, Italy

Re: path of an opened dbf file.

Post by vierirom »

Hi Pablo.

You are wonderful !!!
3 hard deep search days on the web !!! and nothing came out !!!

The function is exactly what I am looking for.

Thank you very much.

Vieri Romagnoli
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: path of an opened dbf file.

Post by Rathinagiri »

That is so nice Pablo. Thanks a lot.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

path of an opened dbf file.

Post by Pablo César »

Good to know is usefull for you. Thanks guys.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Javier Tovar
Posts: 1275
Joined: Tue Sep 03, 2013 4:22 am
Location: Tecámac, México

Re: path of an opened dbf file.

Post by Javier Tovar »

Excelente Pablo César, muy bueno y bonito!

Saludos
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

path of an opened dbf file.

Post by Pablo César »

Gracias, Javier.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
dominique_devuyst
Posts: 22
Joined: Wed Dec 20, 2017 8:29 am
DBs Used: DBF
Location: Belgium

Re: path of an opened dbf file.

Post by dominique_devuyst »

Hi everybody,

I also need to find the path of an already opened dbf file.
And I would like to use dbinfo() that I found very usefull.
So I do :
....bla bla
Filepath := dbInfo(DBI_FULLPATH)
.... bla bla
@ P_row,P_col PRINT "File Path : "+alltrim(Filepath) FONT cFont1 SIZE nFontSize1

But it only print the filename, not the full path!

Anyone know why?

Thank you,
Dominique
Post Reply