You may want to try DmQueryRecord( DmOpenRef dbR, UInt index). This will
return the handle to the record (just as DmGetRecord) with out setting the
busy record bit. DmGetRecord may be failing because you opened the database
as read-only, and it can't set the Busy bit for that record. Using
DmQueryRecord is a little faster in that you will not have to call
DmReleaseRecord when finished with the record.
Hope it helps,
-Doug
-----Original Message-----
From: Iannick Breault [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 13, 1999 4:32 PM
To: '[EMAIL PROTECTED]'
Subject: DmGetRecord() Problem...
When I use the function DmGetRecord() with a certain database of my
application, DmGetRecord() returns 0. That is not really a problem for me,
if DmGetLastErr() returns an error code. In this case, DmGetLastErr()
returns 0.
Here is the line written in my code :
DmGetRecord(MechanismDB, itemNum);
In debug mode, MechanismDB not NULL (open in ReadOnly mode)
itemNum = 0
** Please note that DmNumRecords() returns 22... wich is the correct number
of record in the database **
An other important thing is that this is the first occurence of
DmGetRecord() on MechanismDB database in the code, before that, the only
function used on MechanismDB is DmOpenDatabase() an it works well.
I've tryed everything from hard reset to changing the values in debug mode
to see if for example asking for the second or third record would change
something... it does not ! hehehe
Please help me
Iannick Breault
MBS
Montreal, Canada