So we are going to implement the same funcionality using FWH and FWH AI Classes.
This is a true AI agent and it is a great example of what AI power can do for you

Stay tunned...

Yesterday, I looked at your example in the AI section. I then thought that if JSON or CSV databases are suggested for such examples, a modernized DBF could experience a revival here.
According to AI, the following improvements should be made:
Potential Improvements to the DBF Format
To make DBF more competitive in the context of AI, the following enhancements could be introduced:
Support for Larger Datasets:
Raising file size and field number limits to keep up with modern requirements.
Compression:
Integrated support for compression to save storage space.
Advanced Data Types:
Support for complex data types such as JSON, arrays, or BLOBs.
Timestamps and Logging:
Automatic logging of changes or accesses, similar to relational databases.
Encryption:
Support for native encryption to protect sensitive data.
DBF could have advantages over CSV and MySQL in the AI context, especially in scenarios like:
Smaller, local applications.
Simple data structures.
Systems with limited resources.
With some modern adaptations, DBF could be considered a lightweight and robust alternative, particularly for specialized AI applications. The format has potential if it is systematically modernized.
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oChat := TDeepSeek():New()
local dummy := FW_SetUnicode( .T. )
local cDatabase := "foros_antiguos"
local oCn := maria_Connect( "localhost," + cDatabase + ",fivetec1_antonio,1234", .T. )
local aTables, cTable
local hDatabase := { => }, cJson
if oCn == nil
MsgAlert( "Error connecting to database" )
return nil
endif
aTables = oCn:ListBaseTables()
for each cTable in aTables
hDatabase[ cTable ] = oCn:ListColumns( cTable )
next
oChat:Send( "tell me the SQL sentence to list the 10 more active users in the forums using this info," + ;
" give me the SQL sentence, no explanations. Remove the '''SQL from the beginning and the ''' from the end: " + ;
hb_jsonEncode( hDatabase ) )
XBrowser( oCn:Execute( oChat:GetValue() ) )
oChat:End()
return nil