using dbf-files on a NAS

283 views
Skip to first unread message

C.J. Koot

unread,
Oct 1, 2020, 2:00:33 AM10/1/20
to Harbour Users
Hello group,

I am new here, but I hope someone can help me.

I use Harbour in combination with FiveMac. With this package I can create MacOs programs, which works perfect. I have one smaal problem:
I can open all my dbf-files when they are on my harddisk or on a USB-stick.
However, when i put the files on my NAS the program sees the file, but with the command 'USE' I get the error: 'Error DBFNTX\1001 Open error called from DBUSEAREA(0)

If I do the same from my Windows machine with a Windows program (MiniGui Extended) I can open the files.

Anyone who could give me a hint where to look?

Rene Koot

Anand Kr Gupta

unread,
Oct 1, 2020, 5:50:55 AM10/1/20
to harbou...@googlegroups.com
Maybe there is an access rights issue in NAS.
Give full read and write rights to files and folders of dbf files and check

Anand
Working from Home


--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/128adb89-a1c5-4382-b959-9eb58507eff9n%40googlegroups.com.

C.J. Koot

unread,
Oct 1, 2020, 12:24:43 PM10/1/20
to Harbour Users
Hello Anand,

I checked the access rights to the folders and files and they all have full read and write rights.

I have the app DBFEdit downloaded from the app-store and with that app I can open the dbf-files Don't know which programming language is used for this app.

Are there some functions that can check why I get the open error?
Rene

Op donderdag 1 oktober 2020 om 11:50:55 UTC+2 schreef Anand Kumar Gupta:

Osvaldo Ramirez

unread,
Oct 1, 2020, 12:32:56 PM10/1/20
to harbou...@googlegroups.com


Hello Anand

Is there a NAS Admin software that maybe change the SMB ?

HTH

Osvaldo Ramirez

Ash

unread,
Oct 1, 2020, 1:33:52 PM10/1/20
to Harbour Users
Please add your workstation user id and password in NAS and then give yourself read/write access. 

Regards.
Ash

C.J. Koot

unread,
Oct 2, 2020, 6:52:18 AM10/2/20
to Harbour Users
Hello Osvaldo and Ash,

I have checked everything, but with Harbour in combination with FiveMac I can't open the files. With other apps I can open the files with no problem.

Also I discovered that I can't copy files to the NAS with the software, so there are some issues with the write access.

@Ash: how do I add user id and password in Nas? All files and folders have complete read/write access.

Rene Koot.

Op donderdag 1 oktober 2020 om 19:33:52 UTC+2 schreef Ash:

Pete

unread,
Oct 2, 2020, 9:54:32 AM10/2/20
to Harbour Users
Hi,

Why you don't post here the portion of your code you use to access these dbf.
(particularly the lines where you specify the path of the dbfs).
Chances are your program can't "see" the files due to some improper path designation.

regards,
Pete



Francesco Perillo

unread,
Oct 2, 2020, 10:03:17 AM10/2/20
to harbou...@googlegroups.com
Can you read/write the files from a mac command line? I mean, can you save a text file from a mac editor to the shared directory?
You said that the "program can see the files".... how is the directory exported from the NAS? SMB?

C.J. Koot

unread,
Oct 2, 2020, 1:23:30 PM10/2/20
to Harbour Users
Hello Pete,
Here is some code of opening files. I first check if the file is there with the command IF FILE() than I try to open it. with USE

cDataPad := /volumes/homes/documents/
cFile := cDataPad + 'names.dbf'

IF FILE(cFile)
       USE &cFile
ELSE
     MsgInfo(cFile + ' not present')
ENDIF

In my program the user can choose the place where all databasefiles are. When he changes the place where they are I copy all files from the original location to the new location. First I used the command COPY FILE, but that gave an error. Now I use CopyFileTo() which is a command from FiveMac. With this command I can copy all files to the NAS.

I still believe this is a problem with the combination of Harbour and FiveMac. As I mentioned before, if I copy all files to a USB-stick it works perfect, but when I copy them to the NAS I can't open the files.

I also downloaded and installed DBFEdit and this program can open the files with no errors.

Rene Koot

Op vrijdag 2 oktober 2020 om 16:03:17 UTC+2 schreef fperillo:

Francesco Perillo

unread,
Oct 2, 2020, 1:31:20 PM10/2/20
to harbou...@googlegroups.com
try
USE (cFile)


USE (cFile) ALIAS something

I imagine you are trying with a short, 5 lines program and you are using the correct case for filenames... if cFile is "test" is it possible that harbour tries to open test.DBF?


Pete

unread,
Oct 2, 2020, 2:38:18 PM10/2/20
to Harbour Users


On Friday, 2 October 2020 20:23:30 UTC+3, C.J. Koot wrote:
Hello Pete,
Here is some code of opening files. I first check if the file is there with the command IF FILE() than I try to open it. with USE

 
cDataPad := /volumes/homes/documents/

This path looks a little (or more) suspect. I suppose it is enclosed in quotes, right?

two suggestions plus one:

1. you should stop the use of macro operator `&` and start using extended expressions enclosed in parenthesis, as suggested by `fperillo`. that's a general scope modus.
alternatively:
2.  try to change working directory to the one where the dbfs are found, by using the hb_cwd() function.
 hb_cwd( "path_of_dbf"  )
after successful change,  you can use just the names of the dbfs to open them, no need to prefix the path.
3. do you have MAPped  the NAS drive to a permanent  (that is, reconnect at sign-in) drive letter?  if not why not? ;-)

regards,
Pete
 

Francesco Perillo

unread,
Oct 2, 2020, 2:53:01 PM10/2/20
to harbou...@googlegroups.com
Mac hasn't drive letters...

Pete

unread,
Oct 2, 2020, 3:26:09 PM10/2/20
to Harbour Users


On Friday, 2 October 2020 21:53:01 UTC+3, fperillo wrote:
Mac hasn't drive letters...


an illiterate Mac!  too bad to be false. ;-)
Well, in the first post he had referred the use of minigui
which is windows only, and I overlooked he was talking about fivemac and the likes.
"Mea culpa"!

regards,
Pete

Francesco Perillo

unread,
Oct 2, 2020, 3:37:10 PM10/2/20
to harbou...@googlegroups.com
I'd very afraid of mixing access to DBFs from mac and windows at the same time, without proper checking of locking...

In this case I'd switch to something like NETIO....

--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.

Auge & Ohr

unread,
Oct 2, 2020, 3:45:26 PM10/2/20
to Harbour Users
hi,

I use Harbour in combination with FiveMac. With this package I can create MacOs programs, which works perfect. I have one smaal problem:

ask at FiveWin for hat Problem

---

have just read about MacOS and SMB

"smb://"
"smb://nas"
"smb://nas/video"


try this Syntax it it help


---

Password are store as HASH but Windows HASH is different to Linux or MacOS HASH
try a "simple" Password without "special" Sign ( CHR() < 128 ) if that work

Reply all
Reply to author
Forward
0 new messages