Antonio,
I guess, at ADO_LOCATE(), in aWAData[ WA_SCOPEINFO ][ UR_SI_CFOR ] for the find, all before -> should be ignored, with substr o sttoken.
Thank you.
CASE uInfoType == DBI_ISREADONLY // LUCAS
uReturn := .F.
lucasdebeltran wrote:Antonio,
I guess, at ADO_LOCATE(), in aWAData[ WA_SCOPEINFO ][ UR_SI_CFOR ] for the find, all before -> should be ignored, with substr o sttoken.
Thank you.
DBI_ISREADONLY --> lIsReadOnly (READONLY)
See also: command USE. The return value is .T. (true) when a database file is open in READONLY mode in the current work area.
i) You have ANNOUNCE ADORDD twice on top of it.
ii) Also, at ADO_OPEN() you have to comment out:
/*
aOpenInfo[ UR_OI_NAME ] += ".dbf"
hb_adoSetTable( aOpenInfo[ UR_OI_NAME ] )
hb_adoSetEngine( "")
hb_adoSetServer( "")
hb_adoSetQuery( )
hb_adoSetUser( "")
hb_adoSetPassword( "" )
*/
iii) And:
// aWAData[ WA_TABLENAME ] := SUBSTR(CFILENOPATH(aWAData[ WA_TABLENAME ] ),1,LEN(CFILENOPATH(aWAData[ WA_TABLENAME ] ))-4)
iv) Browses requiere mandatory at ADO_OPEN() :
oRecordSet:CursorLocation := adUseClient //its slower but has avntages such always bookmaks
oRecordSet:LockType := adLockOptimistic
lucasdebeltran wrote:Yes, that´s the only possible way in ADO.
Also, please don´t forget to open indexes automatically.
Antonio L., I think we might wait some days, as adordd.prg need some extra testing.
But, indeed, it´s going to be superb.
USE ( cMyPath + "CUSTOMER.DBF" ) NEW ALIAS "CUST"
CUST->(OrdSetFocus("CUST1"))
lucasdebeltran wrote:Hello,
In DBFCDX, there is not need to call SET INDEX TO..., indexes are opened automatically. Just:
- Code: Select all Expand view
USE ( cMyPath + "CUSTOMER.DBF" ) NEW ALIAS "CUST"
CUST->(OrdSetFocus("CUST1"))
Nothing more.
Antonio do you have any idea over the seek problem?
INDEX ON FIELD->NOMBRE TAG CLIENTES1 FOR !Deleted()
INDEX ON FIELD->CODIGO TAG CLIENTES2 FOR !Deleted()
INDEX ON FIELD->NIF TAG CLIENTES3 FOR !Deleted()
DbCloseAll()
STRUCTURAL BAGs
A structural index is no more than a BAG whose particularity have the same name as the table.
What we gain from this? Is that opening the table to which it is associated, also opens automatically
command economy. It is usually created automatically with:
USE MyDatabase New
INDEX ON TAG TO FILE NAME = TABLE´S NAME
....
Also:
SET AUTOPEN
Toggles automatic opening of a structural index file.
Syntax
SET AUTOPEN ON | off | (<lOnOff>)
Arguments
ON | off | (<lOnOff>)
The option toggles if a structural index file is automatically opened with the USE command. With ON or .T. (true), an index file is automatically opened. OFF or .F. (false) switch this mode off. Description
Some replaceable database drivers support automatic opening of index files with the USE command when the index file has the same file name as the database file (without extension). An example is the DBFCDX driver. SET AUTOPEN toggles this behavior.
When SET AUTOPEN is set to ON, which is the default, the USE command automatically opens an index file having the same name as the database file and the file extension returned from OrdBagExt().
Note: if an index file is automatically opened, a controlling index is not activated. The default index order is zero, i.e. records are accessible in physical order in the work area. To select a controlling index, call OrdSetFocus() or use SET AUTORDER for a default controlling index.
Info
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 44 guests