Link to home
Start Free TrialLog in
Avatar of skdan
skdanFlag for Slovakia

asked on

VB 2010 - lock/unlock DBF files via BDE (part 2)

Hi,

I need to set lock on DBF (dBase) table via BDE API in Visual Basic 2010. Similar like Delphi procedure:

TTable.LockTable(LockType: TLockType);

My questions are:

1. Should I open the table before locking and get its handle? If yes, how can I open the table via BDE API?

2. What happens on HDD, when lock is set? (the attribute od file DBF is set to read only, or BDE creates some temporary file as lock, or BDE writes somewhere the information, that this table is locked)

Thanks
Avatar of Geert G
Geert G
Flag of Belgium image

the flaw with dbase is that anyone with access to the files can just delete them

move the data to a real database, like mssql, oracle, interbase, ...
bde is deprecated, it's over 10 years now

you'll loose a day or 2 converting to another database
but you'll find it's worth every bit of that time
you wouldn't have to recreate the indexes every week ...

dbase isn't really multiuser, the bde just mimicks it in a very good way
Avatar of skdan

ASKER

I agree, but currently I am creating an application, which will use the same data (dbf files) like other older application created in Delphi. Users are using that older application in network. I can't change it.
it's probably easier to rewrite the whole thing and then add your extra functionality ?

how hard can it be to convince management to renew the app for which there doesn't seem to be anybody around anymore to support it ?

if you have the delphi sources, find an (external) delphi dev to extend it (and convert to new db)
Avatar of skdan

ASKER

That Delphi application is older, but still in use, with support, upgrades and so on. My application adds some funcionality, which Delphi programers don't plan to add to their application. They created the new system with SQL server, but it will take some time, when all users move to new version. But I agree, this is the future, of course.
ASKER CERTIFIED SOLUTION
Avatar of Sinisa Vuk
Sinisa Vuk
Flag of Croatia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of skdan

ASKER

It's a good idea to try it with ado. I will try it. Thank you very much.