fbpx
Welcome, Guest
Username: Password: Remember me
This public forum is meant for questions and discussions about Visual FoxPro
  • Page:
  • 1

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

USE a table over a network? 1 month 2 weeks ago #13246

  Kevin Clark's Avatar Topic Author Kevin Clark Offline Posts: 47
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.

Please Log in or Create an account to join the conversation.

USE a table over a network? 1 month 2 weeks ago #13250

  RRG4XS's Avatar RRG4XS Offline Posts: 22
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

Please Log in or Create an account to join the conversation.

USE a table over a network? (revised: not actually a network issue) 1 month 2 weeks ago #13251

  Kevin Clark's Avatar Topic Author Kevin Clark Offline Posts: 47
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.

Please Log in or Create an account to join the conversation.

USE a table over a network? (revised: not actually a network issue) 1 month 2 weeks ago #13252

  Karl-Heinz's Avatar Karl-Heinz Offline Posts: 521
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 ...
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:\XIDE\Projects\Project1\Applications\FoxNetOpen\Prg\Start.prg:Zeile 16.

Do you see the same exception if a UNC path is used ?
FUNCTION Start( ) AS VOID
LOCAL cDbf, cPath AS STRING  
 
//	RddSetDefault ( "DBFCDX" )     
	
	RddSetDefault( "DBFVFP")
	
 
	cPath := "\\WIN-005LK3HMQOV\win7\xsharp\"	


	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

Please Log in or Create an account to join the conversation.

USE a table over a network? (revised: not actually a network issue) 1 month 2 weeks ago #13253

  robert's Avatar robert Offline Posts: 1540
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
XSharp Development Team
The Netherlands

Please Log in or Create an account to join the conversation.

USE a table over a network? (revised: not actually a network issue) 1 month 2 weeks ago #13256

  Kevin Clark's Avatar Topic Author Kevin Clark Offline Posts: 47
Karl-Heinz, I can open a DBF file using a UNC path with no problem.

Please Log in or Create an account to join the conversation.

USE a table over a network? (revised: not actually a network issue) 1 month 2 weeks ago #13262

  Karl-Heinz's Avatar Karl-Heinz Offline Posts: 521
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

Please Log in or Create an account to join the conversation.

Last edit: by Karl-Heinz.

USE a table over a network? 1 month 2 weeks ago #13263

  RRG4XS's Avatar RRG4XS Offline Posts: 22
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

Please Log in or Create an account to join the conversation.

USE a table over a network? (revised: not actually a network issue) 1 month 1 week ago #13274

  Kevin Clark's Avatar Topic Author Kevin Clark Offline Posts: 47
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 "\\ignatius2\foxpro\masterlist\dbase\test-file2.dbf" new shared

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

Kevin

Please Log in or Create an account to join the conversation.

USE a table over a network? (revised: not actually a network issue) 1 month 1 week ago #13279

  robert's Avatar robert Offline Posts: 1540
Karl Heinz,
can you send me the DBF and DBC file where you see this problem ?

Robert
XSharp Development Team
The Netherlands

Please Log in or Create an account to join the conversation.

USE a table over a network? (revised: not actually a network issue) 1 month 1 week ago #13282

  Kevin Clark's Avatar Topic Author Kevin Clark Offline Posts: 47
Robert, it seems that X# might be reading the entire contents of the DBC when a table in a DBC is opened. This seems to be the case because opening a table in a container with thousands of tables takes several minutes. Opening a table in a container with only about 100 tables happens pretty quickly. In Foxpro the numbers of tables in the DBC does not affect the time to open a particular table, so I'm not sure what the benefit of reading the entire DBC would be (assuming that is what the program is doing).

Please Log in or Create an account to join the conversation.

USE a table over a network? (revised: not actually a network issue) 1 month 1 week ago #13283

  Karl-Heinz's Avatar Karl-Heinz Offline Posts: 521
Hi Robert,

It´s not about DBC files, it´s about pure DBFs that can´t be opened since the last build via the "dbfvfp" driver. I have already opened a ticket to reproduce the exception

github.com/X-Sharp/XSharpPublic/issues/326

The same happens with DBFs created by DBMax or by my FP-DOS

regards
Karl-Heinz

Please Log in or Create an account to join the conversation.

USE a table over a network? (revised: not actually a network issue) 1 month 1 week ago #13284

  robert's Avatar robert Offline Posts: 1540
Kevin,

That is right. and will be changed in one of the next builds. That is why we described the DBC support as incomplete.
And I had no idea that people would have a DBC with thousands of tables. That does not make much sense to me to be honest.

Robert
XSharp Development Team
The Netherlands

Please Log in or Create an account to join the conversation.

USE a table over a network? (revised: not actually a network issue) 1 month 1 week ago #13285

  Karl-Heinz's Avatar Karl-Heinz Offline Posts: 521

Kevin Clark wrote:
The following line works with no problem:
use "\\ignatius2\foxpro\masterlist\dbase\test-file2.dbf" new shared

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


Hi Kevin

i think it depends on by which tool a DBF was created.

attached are two dbfs

I´m pretty sure both dbfs will open within your VFP environment.
But are you able to open both with X# and the "DBFVFP" driver ?

regards
Karl-Heinz
Attachments:

Please Log in or Create an account to join the conversation.

  • Page:
  • 1