FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Problem opening database
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Problem opening database
Posted: Sun Aug 19, 2007 08:56 AM
Hi,

Here I have a little example that is not working.
The program doens't open the countu.tmp database.
Can anyone tell me why. It is working in FW + clipper 5.2e

#INCLUDE "fivewin.CH"
REQUEST DBFCDX
FUNCTION test()
   local vstruct:={}
   RDDSETDEFAULT("DBFCDX")
   dbstructuur:={}
   aadd(vstruct,{'NTWKNUM','C',2,0})
   aadd(vstruct,{'NODENUM','C',2,0})
   aadd(vstruct,{'NODETYP','C',5,0})
   aadd(vstruct,{'NTWKTYP' ,'C',5,0})
   aadd(vstruct,{'POINTS' ,'N',7,0})
   dbcreate('count.tmp',vstruct)
   use ('count.tmp') new
   index on str(val(ntwknum),2) to ('countu') unique
   copy to ('countu.tmp')
   use countu.tmp new
   go top
RETURN nil


The error occur in the last line 'go top'

Thanks
Marc
Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Problem opening database
Posted: Sun Aug 19, 2007 11:02 AM

Marc,

Try to place a SysRefresh() call in between, as it may be still open:

copy to ('countu.tmp')
SysRefresh()
use countu.tmp new

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Problem opening database
Posted: Mon Aug 20, 2007 05:58 AM
Hi,

The problem is solved by replacing

index on str(val(ntwknum),2) to ('countu') unique

with
index on str(val(ntwknum),2) tag ('countu') unique



In FW + six-driver the first line also works fine.

Regards,
Marc
Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Problem opening database
Posted: Mon Aug 20, 2007 07:16 AM

Marc,

What was the replacement ? The two lines are the same

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Problem opening database
Posted: Mon Aug 20, 2007 09:53 AM

Antonio,

In the first line is INDEX ON ... TO ... and the second is INDEX ON ... TAG ...

Marc

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Problem opening database
Posted: Mon Aug 20, 2007 09:59 AM

ok, thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion