AI gemini with rdd support( dbbegintransaction , and roll back )

237 views
Skip to first unread message

priadi andika

unread,
Jun 20, 2025, 7:51:51 AMJun 20
to harbou...@googlegroups.com

Hi Group 


I asked a question in Gemini about how to create a multiple data and multi user procedur

result :

Important Notes:

  • RDD Support: DbBeginTransaction(), DbCommitTransaction(), and DbRollbackTransaction() are part of the RDD API. While DBFCDX fully supports them, not all RDDs (especially older or simpler ones) might implement full transactional capabilities. For DBF files, DBFCDX is the standard and recommended RDD for this.
  • Locking: DbBeginTransaction() does not acquire locks automatically. You still need to use DbRLock() or DbFLock() on the specific records or files you are modifying within the transaction. However, DbCommitTransaction() and DbRollbackTransaction() will release all locks that were acquired during the transaction

where can i find this function in harbour

Thanks for attention , support and solution
BR
SPD


Francesco Perillo

unread,
Jun 20, 2025, 8:14:09 AMJun 20
to harbou...@googlegroups.com
Are you sure these functions exist ?

C:\cvs\harbour>c:\bin\grep.exe -d -i dbbegintransaction *.prg
tests\lnlenli2.prg: grep: input lines truncated - result questionable

C:\cvs\harbour>c:\bin\grep.exe -d -i dbbegintransaction *.c

C:\cvs\harbour>

--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/harbour-users/CAOFG7F2XCkt%3Do%3DkGnXTthx7jc5OO%2B1b5YO33ELVyu_XGrR94zg%40mail.gmail.com.

priadi andika

unread,
Jun 20, 2025, 9:23:29 AMJun 20
to harbou...@googlegroups.com
Dear Frans

Not sure
that's why i asked in the group
Thanks for attention and your feedback 

Best Regard
SPD

Daniele Campagna

unread,
Jun 20, 2025, 10:58:21 AMJun 20
to harbou...@googlegroups.com

I have a vague remembering, maybe this is Alaska++ or some SQL RDD. Not part of core Harbour, and no, DBFCDX AFAIK has no rollback or transactions. 

I know I have read about transactions in xBase, or something similar, somewhere, sometimes, but can't find the right neuron right now :-)

Dan

arielso...@gmail.com

unread,
Jun 20, 2025, 11:51:08 AMJun 20
to harbou...@googlegroups.com

Buen día

Con SQLRDD para HARBOUR

se utiliza de esta forma en producción

 

Try                                  

SR_BeginTransaction()                                 

  GRABA_NOTA()

 SR_CommitTransaction()

 SR_EndTransaction()

Catch oError

   SR_RollBackTransaction()

    PLSWAIT(.T.,"Hubo un error al grabar la nota ..")

    Inkey(3)

    PLSWAIT(.F.)

End Catch

Message has been deleted

pete....@gmail.com

unread,
Jun 20, 2025, 1:04:07 PMJun 20
to Harbour Users
Hi.
Gemini is a cute AI puppy which "suffers" of fantasies!
Sometimes, he/she/it doesn't hesitate to even "invent" things
in a rushed attempt to be helpful.
I have got some really hilarious answers by this "omniscient" parrot,
so be careful what to accept as true from the given answers.
Anyway, the easiest way to find whether a given function exists
into harbour namespace is to ask hbmk2 by typing in command line:

hbmk2 -find <funcname>

and then you can dive into sources
to study the findings (if any).

in your case, you could do:
     hbmk2 -find transact
try it and see the results...

Also there are some good pages
with harbour docs out there
which you may want to visit for

Angel Pais

unread,
Jun 20, 2025, 1:52:37 PMJun 20
to harbou...@googlegroups.com
AI is a great Liar.

--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.

juanpere...@gmail.com

unread,
Jun 21, 2025, 12:54:43 AMJun 21
to Harbour Users
No, Harbour does not natively support transactions (DBBeginTransaction()/DBRollback()) with standard DBF files. Traditional DBF files lack built-in transaction support (ACID compliance).

Technical Explanation:
1. Why Transactions Don’t Work with DBF

    DBF files are non-transactional:
        They do not maintain a change log for rollbacks.
        No built-in row/table locking for atomic operations.

2. Real Transaction Support (Alternatives)

    Advantage Database Server (ADS):
    Supports AdsBeginTransaction() and AdsRollback().

    SQL Databases (MySQL, PostgreSQL, MariaDB, FireBird):
    Use Harbour SQL libraries (e.g., hb_mysql, hb_pgsql).

Conclusion:

    For true transactions: Migrate to ADS or SQL databases.

Response generated by DeepSeek

arielso...@gmail.com

unread,
Jun 21, 2025, 1:00:51 AMJun 21
to harbou...@googlegroups.com

Another alternative is SQLRDD for Harbour

Reply all
Reply to author
Forward
0 new messages