2013-02-25 15:37 UTC-0800 Pritpal Bedi (bedipritpal at hotmail.com) r178 [ HbDBU ]

89 views
Skip to first unread message

Pritpal Bedi

unread,
Feb 25, 2013, 6:42:35 PM2/25/13
to qtcon...@googlegroups.com
2013-02-25 15:37 UTC-0800 Pritpal Bedi (bedipritpal at hotmail.com)
  * hbdbu/dbu.prg
  * hbqtwidgets/hbqtdbu.prg
    + Implemented: to open table(s) passded on command-line.
       C:\>HbDBU.exe c:\harbour\tests\test.dbf
       Multiple files can be designated separated by a space.
       Filename must not contain any space.

       Feature requested by Massimo.

Massimo Belgrano

unread,
Feb 26, 2013, 10:14:10 AM2/26/13
to qtcon...@googlegroups.com
Very Thanks
possible .dbf not reqired in command dile
HbDBU.exe c:\harbour\tests\test
 i have also dbf with other extension (i have rename same dbf to .app)
HbDBU.exe mymenu.app


2013/2/26 Pritpal Bedi <bedip...@hotmail.com>

--
You received this message because you are subscribed to the Google Groups "QtContribs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qtcontribs+...@googlegroups.com.
To post to this group, send email to qtcon...@googlegroups.com.
Visit this group at http://groups.google.com/group/qtcontribs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Massimo Belgrano
Delta Informatica S.r.l. (http://www.deltain.it/mbelgrano

Pritpal Bedi

unread,
Feb 26, 2013, 1:03:11 PM2/26/13
to qtcon...@googlegroups.com
Hi


 i have also dbf with other extension (i have rename same dbf to .app)
HbDBU.exe mymenu.app


Probbaly no.

I need to detect if it is a valid table without opening it in raw mode.
Also there are other number of parameters can be supplied, so the only 
way to detect if a parameter is a table is its extension.


Pritpal Bedi

Massimo Belgrano

unread,
Feb 26, 2013, 1:27:41 PM2/26/13
to qtcon...@googlegroups.com
I remember an old way
opening a VFP-format DBF file and reading its 1st byte, like this >
lnFH=FOPEN([D:\MyDir\MyTable.DBF],10)
 scrByte_SF=FREAD(m.lnfh,1)



2013/2/26 Pritpal Bedi <bedip...@hotmail.com>

--
You received this message because you are subscribed to the Google Groups "QtContribs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qtcontribs+...@googlegroups.com.
To post to this group, send email to qtcon...@googlegroups.com.
Visit this group at http://groups.google.com/group/qtcontribs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Massimo Belgrano

unread,
Mar 5, 2013, 12:42:43 PM3/5/13
to qtcon...@googlegroups.com
Can use other rdd in command line
and SET EXCLUSIVE


2013/2/26 Pritpal Bedi <bedip...@hotmail.com>

--
You received this message because you are subscribed to the Google Groups "QtContribs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qtcontribs+...@googlegroups.com.
To post to this group, send email to qtcon...@googlegroups.com.
Visit this group at http://groups.google.com/group/qtcontribs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Pritpal Bedi

unread,
Mar 5, 2013, 2:48:53 PM3/5/13
to qtcon...@googlegroups.com
Hi



Can use other rdd in command line

I will think. It is possible.
 
and SET EXCLUSIVE

May be not on the command line, but via interface it can be, will implement.


Pritpal Bedi 

Massimo Belgrano

unread,
Mar 18, 2013, 6:52:38 AM3/18/13
to qtcon...@googlegroups.com
the problem is that when open dbf used from my app
Immagine in linea 1


2013/3/5 Pritpal Bedi <bedip...@hotmail.com>

--
You received this message because you are subscribed to the Google Groups "QtContribs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qtcontribs+...@googlegroups.com.
To post to this group, send email to qtcon...@googlegroups.com.
Visit this group at http://groups.google.com/group/qtcontribs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
image.png

Massimo Belgrano

unread,
Mar 25, 2013, 10:37:43 AM3/25/13
to qtcon...@googlegroups.com
I want notice that not having set exlusive
is only motivation for not use hbdbu from my customer whu have allready open files


2013/3/18 Massimo Belgrano <mbel...@deltain.it>
image.png

Pritpal Bedi

unread,
Mar 25, 2013, 2:00:23 PM3/25/13
to qtcon...@googlegroups.com
Hi

>I want notice that not having set exlusive
>s only motivation for not use hbdbu from my customer whu have allready open files


Let me understand how your clients use the tables 
and how you want to use them.

My understanding is, if one has opened the table in 
EXCLUSIVE mode then nobody else can open it, correct ?

And if one want to open in EXCLUSIVE, and is already opened in any mode,
how it can be done.

How EXCLUSIVE will be used in your scenario ?

After all HbDBU is a programmer's utility, not end-user's.

Explain above before I proceed.


Pritpal Bedi

Massimo Belgrano

unread,
Mar 25, 2013, 2:07:25 PM3/25/13
to qtcon...@googlegroups.com
no are open shared
but hbdbu want use exclusive



2013/3/25 Pritpal Bedi <bedip...@hotmail.com>


Pritpal Bedi

--
You received this message because you are subscribed to the Google Groups "QtContribs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qtcontribs+...@googlegroups.com.
To post to this group, send email to qtcon...@googlegroups.com.
Visit this group at http://groups.google.com/group/qtcontribs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Pritpal Bedi

unread,
Mar 25, 2013, 2:32:33 PM3/25/13
to qtcon...@googlegroups.com
Hi


no are open shared

Are you saying that tables in your application is opened shared ?
 
but hbdbu want use exclusive


No.
HbDBU does not open any table in EXCLUSIVE mode.
All tables are opened in SHARED mode.

Only when a table is CREATED only then it is opened in 
EXCLUSIVE mode to comple INDEX opertaions, and too 
for a brief period.


Pritpal Bedi

Massimo Belgrano

unread,
Mar 25, 2013, 3:24:11 PM3/25/13
to qtcon...@googlegroups.com
all table in my app are open shared and used from many user

seem that not open exclusive my dbu compiled with 
cd \harbour\addons\hbdbu
hbmk2 hbdbu.hbp rddads.hbc -D__ADS__ -rebuild


2013/3/25 Pritpal Bedi <bedip...@hotmail.com>


Pritpal Bedi

--
You received this message because you are subscribed to the Google Groups "QtContribs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qtcontribs+...@googlegroups.com.
To post to this group, send email to qtcon...@googlegroups.com.
Visit this group at http://groups.google.com/group/qtcontribs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Pritpal Bedi

unread,
Mar 25, 2013, 4:42:03 PM3/25/13
to qtcon...@googlegroups.com
>all table in my app are open shared and used from many user

seem that not open exclusive my dbu compiled with 
cd \harbour\addons\hbdbu
hbmk2 hbdbu.hbp rddads.hbc -D__ADS__ -rebuild


Try to open like:

HbDBU.exe ADS mytable.dbf


And let me know.


Pritpal Bedi 

Massimo Belgrano

unread,
Mar 26, 2013, 6:27:42 AM3/26/13
to qtcon...@googlegroups.com
you are right sorry
my fault i using
start G:\hb32\bin\hbdbu.exe %1
instead
start G:\hb32\bin\hbdbu.exe %1 %2 %3 %4 %5 %6 %7 %8

I have tried with follow sample
REQUEST ADS
REQUEST DBFCDX
request DBFFPT


FUNCTION MAIN(x_command)
  rddRegister( "ADS", 1 )
  rddsetdefault( "ADS" )
  AdsSetServerType ( 2 )  // SET SERVER remote
  AdsSetFileType(2)   // SET FILETYPE TO CDX // if you are using DBFCDX
  AdsLocking(  .f.   )  // // SET AXS LOCKING OFF
  ADSRightsCheck( .f.)
  AdsSetCharType(2,.T.)             // font oem + recupera il carattere oem
  G_RDDACT=RDDSETDEFAULT()
  set deleted off
  CLS
  ? DTOC(DATE())+" "
  ?? TIME()
  ? +" "+CURDRIVE()+":\"
  ?? CURDIR()
  ? "RDD="+X_RDD +" option "+G_SERVER
  * TEST TABLE
  aDbf := {}
  AADD( aDbf, { "FN", "N", 10, 0 } )
  AADD( aDbf, { "FNF", "N", 12, 4 } )
  AADD( aDbf, { "FC", "C", 40, 0 } )
  AADD( aDbf, { "FD", "D", 8, 0 } )
  AADD( aDbf, { "FL", "L", 1, 0 } )
  AADD( aDbf, { "FM", "M", 0, 0 } )
  FOR A=1 TO 20
  AADD( aDbf, { "FIELD"+ALLTRIM(STR(A)), "C", 10, 0 } )
  NEXT A
  dbCreate("dbtest",aDbf)
  USE dbtest EXCLUSIVE
  index on fc + str(fn,10,0) to DBtest_i1
  ? "Creating test database - inserting", nrec, " records"
  use dbtest  SHARED
  IF NETERR()
    ? "Unable to open DBTEST - quitting"
    QUIT
  ENDIF
  for i = 1 to 12
        if mod(i,1000) = 0
                // @ 0, 0 SAY i
        endif
        append blank
        replace fn with INT(sin(i)*i)
        replace fnf with sin(i)*i
        replace fc with replicate( CHR(65+INT(ABS(sin(i)*25)) ), 40 )
        replace fd with date() + MOD(INT(sin(i)*i),10000)
        replace fl with IIF( SIN(i) >= 0, .T., .F. )
  next
  commit
  ? "GO TOP:                   "
  USE dbtest SHARED
  browse()
  QUIT
return




2013/3/25 Pritpal Bedi <bedip...@hotmail.com>


Pritpal Bedi 

--
You received this message because you are subscribed to the Google Groups "QtContribs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qtcontribs+...@googlegroups.com.
To post to this group, send email to qtcon...@googlegroups.com.
Visit this group at http://groups.google.com/group/qtcontribs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply all
Reply to author
Forward
0 new messages