Newbie, V4RB (14-Nov beta) Delete fails
Mike Dodd
doddme at mindspring.com
Mon Nov 17 06:08:03 CST 2003
Ruslan -
You are (of course) right on both counts. Originally I did use delete using
the cursor, I thought that was a problem so I changed to the baseObject.
My old code was based on 1.9.7 where the default was ReadWrite, when I went
to 1.9.8 the defaults changes but my code did not. That I think is the
problem.
Thank you for your help.
On 11/17/03 1:16 AM, "Ruslan Zasukhin" <sunshine at public.kherson.ua> wrote:
> on 11/17/03 5:30 AM, Mike Dodd at doddme at mindspring.com wrote:
>
> Hi Mike,
>
> Hmm, it seems you do wrong things.
>
> You obtain from cursor RecID of a record,
> And now try to use BaseObject API to delete it!
>
> But cursor still exists so it keep lock on that record.
> Therefore BaseObject cannot delete it.
> That's the problem.
>
> Why you do not want simply
>
> curs.Delete()
>
> ?
>
>> Why would I not be able to delete a record that was added to a table?
>>
>> if job_cursor.firstRecord then
>> do
>> if run_job(job_cursor.field("recid").getstring) then
>> l_recid = val(job_cursor.field("recid").getstring)
>> if app.mdatabase.mjobs.gotorecid(l_recid) then
>> if app.mdatabase.mjobs.deleterecord() then
>> writeLog("Inside Poll for jobs -Record Deleted")
>> else
>> writelog("Inside Poll for jobs - could not delete the record")
>> end if
>> end if
>> end if
>> loop until job_cursor.nextrecord = FALSE
>>
>>
>> I add the record and I even tried 'flushing' the record, (which works fine,
>> because my test records keep accumulating as expected).
>>
>> I tried deleting off the cursor itself and it fails too.
More information about the Valentina
mailing list