Newbie, V4RB (14-Nov beta) Delete fails

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Nov 17 09:16:04 CST 2003


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.

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list