xsharp.eu • USE a table over a network? (revised: not actually a network issue)
Page 1 of 2

USE a table over a network? (revised: not actually a network issue)

Posted: Fri Feb 14, 2020 2:44 pm
by kevclark64
Is there a problem with using a DBF file that's on a network drive? I have no problem with USE when the table is on a local drive, but when the table is on a network drive the program just stops and never gets past the USE line. I wanted to check the data in XSharp.RuntimeState.GetInstance() but the Watch window freezes on the USE line as well.

USE a table over a network?

Posted: Fri Feb 14, 2020 5:33 pm
by RGreim4XS
HI Kevin, had the same fun with VFP inside a company network.
Can u open the files via win explorer ?
Did you use UNC notation ?
See : vfp wiki Vfp Unc,
Sometimes its also a permission issue.
HTH
Rainer

USE a table over a network? (revised: not actually a network issue)

Posted: Fri Feb 14, 2020 7:18 pm
by kevclark64
Turns out I jumped to a hasty conclusion thinking it was a network problem. It actually has something to do with files being in a particular database container. If I create a table on the network drive but do not put it in the database container then I can open it. If it's in the database container then I found it actually does open after a very long time, between 5 and 10 minutes. it's not a problem with all database containers because I can create a new database, put files in it, and open those files without a problem. The particular database container that is a problem has a very large number of tables in it (several thousand) so maybe that's the issue, or maybe something else about the container is causing the issue.

USE a table over a network? (revised: not actually a network issue)

Posted: Fri Feb 14, 2020 7:50 pm
by Karl-Heinz
Hi Kevin,

i connected to a Win7 VM and opened a DBF via a UNC path. It works when i use the "DBFNTX" or "DBFCDX" driver, but it fails with a exception if the "DBFVFP" driver is used. The error message means "illegal path char". very strange ...

Code: Select all

Unbehandelte Ausnahme: XSharp.Error: Illegales Zeichen im Pfad. ---> System.ArgumentException: Illegales Zeichen im Pfad.
   bei System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
   bei System.IO.Path.Combine(String path1, String path2)
   bei XSharp.RDD.DBFVFP._ReadDbcInfo()
   bei XSharp.RDD.DBFVFP.Open(DbOpenInfo info)
   bei XSharp.CoreDb.<>c__DisplayClass112_0.<UseArea>b__0()
   --- Ende der internen Ausnahmestapelüberwachung ---
   bei XSharp.RT.Functions.DoError(String cSymFunc, Int32 nTries)
   bei XSharp.RT.Functions.DbUseArea(__Usual[] Xs$Args)
   bei FoxNetOpen.Exe.Functions.Start() in C:XIDEProjectsProject1ApplicationsFoxNetOpenPrgStart.prg:Zeile 16.
Do you see the same exception if a UNC path is used ?

Code: Select all

FUNCTION Start( ) AS VOID
LOCAL cDbf, cPath AS STRING  
 
//	RddSetDefault ( "DBFCDX" )     
	
	RddSetDefault( "DBFVFP")
	
 
	cPath := "WIN-005LK3HMQOVwin7xsharp"	


	cDBF := cPath + "Text.dbf" 
	
	USE (cDBF) NEW ALIAS TEST
//	DbUseArea(TRUE, , cDBF , "TEST" ) 
	
	IF Used()

	
		DO WHILE ! Eof()
			
			? test->text1 			

			SKIP 1			
			
		ENDDO 
   	
		USE
	
		
	ENDIF 	



RETURN
regards
Karl-Heinz

USE a table over a network? (revised: not actually a network issue)

Posted: Fri Feb 14, 2020 8:10 pm
by robert
Kevin,

This build has very "primitive" DBC support. All we do is to locate the table in the DBC and read the "long" field names from the DBC. This was necessary because sometimes these long names are used in index expressions
We will add full DBC support (and faster DBC support) in one of the next builds.
Robert

Robert

USE a table over a network? (revised: not actually a network issue)

Posted: Fri Feb 14, 2020 9:53 pm
by kevclark64
Karl-Heinz, I can open a DBF file using a UNC path with no problem.

USE a table over a network? (revised: not actually a network issue)

Posted: Sat Feb 15, 2020 11:11 am
by Karl-Heinz
Hi Kevin,

seems you´re not using the latest 2.3 version, right ?

The build 2.3 seems to throw an "illegal path char" exception no matter if it´s a UNC path or a drive letter path. I installed the previous build "2.2 a" and there are no such "DBFVFP" path problems. I´ll put the pieces together and open a ticket.

regards
Karl-Heinz

USE a table over a network?

Posted: Sat Feb 15, 2020 4:42 pm
by RGreim4XS
Hi, what comes also into my mind. The topic about handling upper and lower case. In older XBASE it was always handled as upper. Then I have updated VFP9 with the fixes VFPA, and nothing works, because now is everything case sensitive.
HTH
Rainer

USE a table over a network? (revised: not actually a network issue)

Posted: Mon Feb 17, 2020 2:15 pm
by kevclark64
Karl-Heinz, I am using version 2.3. (I know that for a certainty because I can use THEN after IF which threw a compiler error in 2.2.)

The following line works with no problem:
use "ignatius2foxpromasterlistdbasetest-file2.dbf" new shared

It works as well to open from a local drive using a drive letter:
use "e:fpd26sqltest.dbf" new shared

Kevin

USE a table over a network? (revised: not actually a network issue)

Posted: Mon Feb 17, 2020 4:09 pm
by robert
Karl Heinz,
can you send me the DBF and DBC file where you see this problem ?

Robert