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 » Thu May 08, 2014 5:11 pm

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
Has thanked: 1 time
Been thanked: 2 times

Post by Javier Tovar » Thu May 08, 2014 5:35 pm

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

Post by vierirom » Thu May 08, 2014 5:59 pm

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
Has thanked: 100 times
Been thanked: 179 times

Post by Pablo César » Thu May 08, 2014 11:08 pm

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

Post by vierirom » Fri May 09, 2014 7:01 am

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: 5211
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 155 times
Been thanked: 145 times
Contact:

Post by Rathinagiri » Fri May 09, 2014 8:54 am

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
Has thanked: 100 times
Been thanked: 179 times

Post by Pablo César » Fri May 09, 2014 1:10 pm

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
Has thanked: 1 time
Been thanked: 2 times

Post by Javier Tovar » Sat May 10, 2014 2:54 am

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
Has thanked: 100 times
Been thanked: 179 times

Post by Pablo César » Sat May 10, 2014 2:55 am

Gracias, Javier.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

dominique_devuyst
Posts: 11
Joined: Wed Dec 20, 2017 8:29 am
DBs Used: DBF
Location: Belgium
Has thanked: 10 times

Post by dominique_devuyst » Tue Mar 27, 2018 1:05 pm

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