Record will not delete
Ruslan Zasukhin
sunshine at public.kherson.ua
Tue Nov 25 19:05:31 CST 2003
on 11/25/03 6:56 PM, Michael Krugman at admin at ktinet.net wrote:
Hi Michael,
> Hi Rusian and List:
>
> I am trying just to delete a single record from my database. I'm using
> 10.3.1, with RB 5.22. Below is the code I am using. Can someone
> please look at it and tell me what I am missing?
It seems you have forget specify ReadWrite for cursor
> I am getting no
> errors. and I'm using a msgbox that tells me I have the right record in
> the cursor....it just will not delete no matter what I do. I added
> comments next to the code to help make sense out if to you. Any help
> is appreciated! Thank you.
>
> Mike
>
> id = Main.Customers.cell(Main.Customers.Listindex, 0)
> // I am using a RB listbox to view records. This line gets the value
> of the first field in the listbox, which is the same as the record id.
>
> //Warn user...Are you sure you want to delete this customer?
> patdelwarn.ShowModal
> if patdelwarn.PressedOK then //User clicked YES
>
> // Get the record with the matching ID into the cursor
> curs = mDataBase.SQLSelect("SELECT * FROM Customers WHERE recID=" +
> id) // I place a msgbox right after this line to tell me which record
> is in the cursor. This matches with the one I selected in the listbox.
> if curs <> nil then
> res = curs.Delete
> 'res = mDataBase.mPatient.DeleteRecord //This is
> commented out. I tried using this too, with no result
> end if
--
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