Problem opening database

Problem opening database

Postby Marc Vanzegbroeck » Sun Aug 19, 2007 8: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

Code: Select all  Expand view
#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
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Marc Vanzegbroeck » Mon Aug 20, 2007 5:58 am

Hi,

The problem is solved by replacing

Code: Select all  Expand view
index on str(val(ntwknum),2) to ('countu') unique

with
Code: Select all  Expand view
index on str(val(ntwknum),2) tag ('countu') unique



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

Regards,
Marc
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Postby Antonio Linares » Mon Aug 20, 2007 7:16 am

Marc,

What was the replacement ? The two lines are the same
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Marc Vanzegbroeck » Mon Aug 20, 2007 9:53 am

Antonio,

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

Marc
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Postby Antonio Linares » Mon Aug 20, 2007 9:59 am

ok, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 60 guests