Olá!
Esse negócio de trabalhar igual DBF não dá certo.
PRÉ CONCEITO!
Ele usa comandos do VFP, não viu os exemplos ?
oSQLConnection1 := hb_SQLConnect()
with object oSQLConnection1
:SetBackendType("MariaDB")
:SetUser("root")
:SetPassword("rndrnd")
:SetDatabase("test001")
// :SetServer("127.0.0.1")
iSQLHandle := :Connect()
do case
case iSQLHandle == 0
?"Already Connected"
case iSQLHandle < 0
? :GetLastErrorMessage()
otherwise
?"connection is",iSQLHandle
endcase
?"MariaDB Get last Handle",:GetHandle()
...
REQUEST HB_CODEPAGE_UTF8
REQUEST SQLMIX , SDDODBC
#define HB_ORM_CURSOR_STRUCTURE_POS 1
#define HB_ORM_CURSOR_STRUCTURE_TYPE 2
#define HB_ORM_CURSOR_STRUCTURE_LEN 3
#define HB_ORM_CURSOR_STRUCTURE_DEC 4
#define HB_ORM_CURSOR_STRUCTURE_NULL 5
#define HB_ORM_CURSOR_STRUCTURE_AUTOINC 6
#define HB_ORM_CURSOR_STRUCTURE_BINARY 7
#define HB_ORM_CURSOR_STRUCTURE_TRIM 8
#define HB_ORM_CURSOR_STRUCTURE_UNICODE 9
#define HB_ORM_CURSOR_STRUCTURE_COMPRESS 10
//=================================================================================================================
class hb_orm_Cursor
hidden:
data p_CursorName init ""
data p_Fields init {=>} //Key is the FieldName, {cFieldType,nFieldLen,nFieldDec,lAllowNull,lIsAutoIncrement,lBinary,lTrimmed,lUnicode,lCompressed}
//Using flags for the extended attributes for performance reason mainly
data p_AutoIncrementLastValue init 0 //If more than one field is marked as AutoIncrement, the value will be unique across all of them.
data p_FieldsForAppend init {} //To make it faster during AppendBlank(), since only care to process certain fields
data p_Indexes init {=>} //Key is the TagName, {cExpression,lUnique}
// Future plans: {cExpression,lUnique,cDirection ("A"scending/"D"esending),cForExpression}
method UpdateRecordCount() /
Apenas não perdeu tempo reinventando a roda, usa o SQLMIX para trazer o resultado. Não tem nada de DBF.
Saudações,
Itamar M. Lins Jr.