Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Delete - SQL not working, Desperate Need of Help
Message
From
01/10/1998 09:04:20
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00142721
Message ID:
00142768
Views:
21
>I have a complex wee form by my standards. A big feature is a grid which gives thisform.keyvalue the primary key of a view.
>
>The view is never edited, instead all the form fields point back to the original tables - the view does some complex concatenations etc.
>
>I have a delete button which verifies if the user really wants to delete and then
>
>
select entry
>delete from bkdata!entry where entryid = m.lckeyvalue
>	
>select entrydet
>delete from bkdata!entrydet where entryid = m.lckeyvalue
>	
>=requery('ventry')
>thisform.pgfEntry.pagPick.grdEntry.refresh()
>
>However, the record in entry doesn't delete. It does if I click in a browse window but not from the command line etc. I've got m.lckeyvalue in there as I wondered if thisform.keyvalue was prohibited. Very confusing.
>
>i need to get this sorted in a big hurry so will really appreciate any suggestions.
>
>Sarah
Hi Sarah,
It should be around midnight there. Still working ? and not solved ? Form and command window might seem to behave differently if form has private datasession and buffering is in effect. Views are always buffered but here case doesn't seem to be related with that (requery()), rather buffering of tables. Your click code could be like this (view never edited):
delete from bkdata!entry where entryid = m.lckeyvalue
delete from bkdata!entrydet where entryid = m.lckeyvalue
=tableupdate(.t.,.t.,"entry3")
=tableupdate(.t.,.t.,"entrydet3")
=requery('ventry')
thisform.pgfEntry.pagPick.grdEntry.refresh()
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform