Using DBF/NSX/SMT File Format

374 views
Skip to first unread message

Riaz Khan

unread,
Feb 3, 2012, 6:29:34 AM2/3/12
to Harbour Developers
Dear All,

Is any one familiar with using dbf files with nxs index and smt memo
files. With FWH.
I am able to open files with nsx and record seeking is active.

The files with memo fields do not open or do not seek once indexes
created.

Can anyone suggest...would appreciate it very much..

Regards
Riaz Khan

Gmail

unread,
Feb 7, 2012, 6:13:00 PM2/7/12
to harbou...@googlegroups.com
Hello Riaz,

You need to provide a self contained example and submit it to the
developers so your problem could be possibly solved (fixed) or explained.
Regards,

Qatan

Riaz Khan

unread,
Feb 8, 2012, 5:43:11 AM2/8/12
to Harbour Developers
Dear All,
I am using Harbour 3.1 and have a problem..:
My dbf files along with index nsx and memo smt file are opened and
create indexes via the prg. With no errors. The source is as
follows.:
 CASE aFiles[ss] = 'P5_PPFM'
          oMeter:Set(++nCount)
          Index On CODE+STR(RECNO())          TAG "P5_PPFM1"
EVAL( SysRefresh() )
          oMeter:Set(++nCount)
          Index On NAME+STR(RECNO())          TAG "P5_PPFM2"
EVAL( SysRefresh() )
          oMeter:Set(++nCount)
          Index On DESCEND(SCAL)+DTOS(JO_DT)+DESI+STR(RECNO())  TAG
"P5_PPFM3"  EVAL( SysRefresh() )
The dbf files without any memo field do a SEEK well.
The dbf files with a memo field does NOT seek.
I use a utility of bdbfs (a dbf file editor) to do file maintenance
outside of my application.  After index creation via fbs I am unable
to seek for files containing memo fields..
The PACK command  via fbs application produces this error..:
Time from start: 0 hours 0 mins 8 secs
   Error occurred at: 06/02/2012, 21:47:53
   Error description: (Application: 38) DBFNSX/1010  Read error:
\PPFNSX\PFL\PFL-1112\P5_PPFM.smt
Stack Calls
===========
   Called from:  => __DBPACK( 0 )
   Called from: .\W_624.PRG => W_6241( 100 )
   Called from: .\W_624.PRG => (b)W_624( 40 )
   Called from: .\source\classes\BUTTON.PRG => TBUTTON:CLICK( 157 )
   Called from: .\source\classes\CONTROL.PRG =>
TBUTTON:HANDLEEVENT( 1654 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3159 )
   Called from:  => SENDMESSAGE( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:COMMAND( 379 )
   Called from:  => TWINDOW:HANDLEEVENT( 0 )
   Called from: .\source\classes\DIALOG.PRG =>
TDIALOG:HANDLEEVENT( 886 )
   Called from:  => DIALOGBOX( 0 )
   Called from: .\source\classes\DIALOG.PRG =>
TDIALOG:ACTIVATE( 270 )
   Called from: .\W_624.PRG => W_624( 46 )
   Called from: .\W_62.PRG => W_62( 5 )
   Called from: .\W_Main.PRG => (b)BUILDMENU( 566 )
   Called from: .\source\classes\MENU.PRG => TMENU:COMMAND( 461 )
   Called from: .\source\classes\WINDOW.PRG =>
TWINDOW:COMMAND( 1033 )
   Called from: .\source\classes\MDIFRAME.PRG =>
TMDIFRAME:COMMAND( 247 )
   Called from:  => TMDIFRAME:HANDLEEVENT( 0 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3159 )
   Called from:  => WINRUN( 0 )
   Called from: .\source\classes\WINDOW.PRG =>
TMDIFRAME:ACTIVATE( 980 )
   Called from: .\W_Main.PRG => MAIN( 250 )
My call in main prg  is as follows:
REQUEST DBFNSX
RDDREGISTER( "DBFNSX" , 1 )
RDDSETDEFAULT( "DBFNSX" )
Sx_AutoOpen(.F.)
This function SX_MemoExt() return ".SMT"
Can anyone suggest any solution,

Massimo Belgrano

unread,
Feb 8, 2012, 6:35:14 AM2/8/12
to harbou...@googlegroups.com
Please post A sample revising this 

REQUEST DBFNSX
RDDREGISTER( "DBFNSX" , 1 )
PROC main()
RDDSETDEFAULT( "DBFNSX" )
Sx_AutoOpen(.F.)
ROC main()
LOCAL nRecno
 DBCREATE("test271", {{"F", "C", 1, 0}},, .T.)
 DBAPPEND();  F := "A"
 DBAPPEND();  F := "A"
 DBAPPEND();  F := "B"
 DBAPPEND();  F := "B"
 DBAPPEND();  F := "C"
 DBAPPEND();  F := "C"
 INDEX ON F+STR(RECNO(),12,0)  TAG f TO test271 
 

Il giorno 08 febbraio 2012 11:43, Riaz Khan <amria...@gmail.com> ha scritto:

--
Massimo Belgrano

Mindaugas Kavaliauskas

unread,
Feb 8, 2012, 7:24:40 AM2/8/12
to harbou...@googlegroups.com
Hi,


On 2012.02.08 12:43, Riaz Khan wrote:
> The source is as follows.:
> CASE aFiles[ss] = 'P5_PPFM'
> oMeter:Set(++nCount)
> Index On CODE+STR(RECNO()) TAG "P5_PPFM1"
> EVAL( SysRefresh() )
> oMeter:Set(++nCount)
> Index On NAME+STR(RECNO()) TAG "P5_PPFM2"
> EVAL( SysRefresh() )
> oMeter:Set(++nCount)
> Index On DESCEND(SCAL)+DTOS(JO_DT)+DESI+STR(RECNO()) TAG
> "P5_PPFM3" EVAL( SysRefresh() )


D:\PRG>c:\harbour\bin\hbmk2 RiazKhan.prg
Harbour 3.1.0dev (Rev. 17147)
Copyright (c) 1999-2012, http://harbour-project.org/
Compiling 'RiazKhan.prg'...
RiazKhan.prg(1) Error E0046 CASE or OTHERWISE does not match DO CASE
RiazKhan.prg(9) Error E0030 Syntax error "syntax error at 'ON'"
RiazKhan.prg(10) Error E0030 Syntax error "syntax error at 'EVAL'"
3 errors

No code generated.


> Can anyone suggest any solution,

Yes, I can. Solution is written in harbour/INSTALL section 10.12.


Regards,
Mindaugas

Riaz Khan

unread,
Feb 9, 2012, 1:40:37 AM2/9/12
to harbou...@googlegroups.com
Hi  Mindaugas 

Apparently, I don't have this section in my doc. Would you be kind enough to send me the related section, as I can not find it.

Thanks and regards..

Klas Engwall

unread,
Feb 9, 2012, 3:25:37 AM2/9/12
to harbou...@googlegroups.com
Hi Riaz,

> Apparently, I don't have this section in my doc. Would you be kind
> enough to send me the related section, as I can not find it.

You can always find the latest version right here:

http://harbour-project.svn.sourceforge.net/viewvc/harbour-project/trunk/harbour/

Click on the filename in the list and then on "View"

Regards,
Klas

Reply all
Reply to author
Forward
0 new messages