ADOFUNC.prg e SQLEXPRESS

Post Reply
User avatar
mauri.menabue
Posts: 163
Joined: Thu Apr 17, 2008 2:38 pm

ADOFUNC.prg e SQLEXPRESS

Post by mauri.menabue »

Hello everyone

I decided to try using MSSQL EXPRESS to do this I thought I'd start
using the functions in ADOFUNC. PRG I was wondering:

1) If it is the best way to start or it is better to use ADORDD

2) How to run an Rlock or Flock to prevent two users from working
on the same record or groups of records.

3) If there is a need to do maintenance on compaction, reindexing

Thank you
Maurizio Menabue
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: ADOFUNC.prg e SQLEXPRESS

Post by nageswaragunupudi »

1) If it is the best way to start or it is better to use ADORDD


We recommend using FWH adofuncs.
You can directly work with ADO without any of these functions, but using adofuncs makes your life very easy.

3) If there is a need to do maintenance on compaction, reindexing

No need for SQLEXPRESS, MSSQL, ORACLE, etc.
Well, you need to do it if you are using MSACCESS and adofuncs have function to do this.

2) How to run an Rlock or Flock to prevent two users from working
on the same record or groups of records.


We can open a table with optimistic locking or pessimistic locking. Mostly tables are opened with optimistic locking and there is no need to locking.
If we open a table with pessimistic locking, we can use record locks.
We advise you to unlearn DBF programming habits and record locking is not desirable or practiced normally.
Anyway, it is upto you.
Regards

G. N. Rao.
Hyderabad, India
User avatar
mauri.menabue
Posts: 163
Joined: Thu Apr 17, 2008 2:38 pm

Re: ADOFUNC.prg e SQLEXPRESS

Post by mauri.menabue »

Hello everyone
I would ask for further clarification on these aspects:

1) Is it possible to open multiple cursors (aliases) for the same table?

Code: Select all | Expand



    E.g. (x)Harbour LOCAL cALIAS1 := cGetNewAlias("CUSTOMERS")
                            LOCAL cALIAS2 := cGetNewAlias("CUSTOMERS")

                           USE NEW ALIAS CUSTOMERS (cAlias1) ....
                           USE NEW ALIAS CUSTOMERS (cAlias2) ....

 


2) By default you don't need to define any type of lock, so I suppose if two users
vary the same record and both confirm the change in the record update
with a timeline, or rather the variation of the last
user confirming the transaction, I wonder if there is no function that warns a
user that someone (better than user) is already working on that record.

TIA
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: ADOFUNC.prg e SQLEXPRESS

Post by nageswaragunupudi »

1) Yes.
2) If both users are working on the same record at the same time after one user saves changes the other can not save his changes. He will get an error. The second user has to cancel his changes, read the record again, and then do whatever.
Regards

G. N. Rao.
Hyderabad, India
Post Reply