Home » Developer & Programmer » Forms » how to delete records
how to delete records [message #253305] Mon, 23 July 2007 07:45 Go to next message
ghazanfar
Messages: 29
Registered: June 2003
Junior Member
i have a master detail form detail block is being populated by entering a field in master block now if 50 records r coming in a detail block by entering a field in master block then i wana clear those record from detail block before saving to database having one field containg null
Re: how to delete records [message #253416 is a reply to message #253305] Mon, 23 July 2007 16:02 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
excuse me what did you say what does it mean that one field is containing null why are you entering all those records into the detail block and then you'd like to delete them before saving oh by the way delete records using the delete_record built-in or if you want to delete both master and detail you could declare a foreign key constraint using the delete cascade option but you didnt say whether you want to delete master record or delete it along with its details



Now, if you understood what I've just said above, cool. Because I didn't understand what you've said in your post. Did you ever heard of punctuation? It is used to improve reading and UNDERSTANDING of what someone has to say.

So please, reformat your message so that it is readable and explain the question a little bit better.

Or, spend some time to decipher those several lines of mine.
Re: how to delete records [message #253621 is a reply to message #253305] Tue, 24 July 2007 07:29 Go to previous messageGo to next message
ghazanfar
Messages: 29
Registered: June 2003
Junior Member
i have a master detail form detail block is being populated by entering a field in master block now if 50 records r coming in a detail block by entering a field in master block then i wana clear those record from detail block before saving to database having one field containg null


i have mentioned that i wana delete records from detail block having records contaning null in single column or more
Re: how to delete records [message #253744 is a reply to message #253621] Tue, 24 July 2007 14:36 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It seems that you'll have to loop through the whole detail record set and check all items, one by one, whether their contents is null or not. If it is, delete this record.
Re: how to delete records [message #255159 is a reply to message #253621] Mon, 30 July 2007 20:35 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Ghazanfar,

Please read the sticky "Punctuation - it exists, use it!!". The agreed language of communication in this forum is 'English' and it has conventions like a leading capital at the beginning of a sentence and trailing punctuation to indicate whether the sentence is declarative or imperative (a period), interrogative (a question mark), or exclamatory (an exclamation mark).

That aside, consider using a 'delete' statement in which you use the master details to select the 'range' and tests of 'is null' to find the required records. Then go the the detail block and perform an execute_query to shows those that are left.

David
Previous Topic: HOST command on Linux
Next Topic: how i can sum values in one detailed text item ?
Goto Forum:
  


Current Time: Fri Sep 27 02:15:16 CDT 2024