delete

VBA snippet to delete outlook messages from a user created folder that are 6 months or older

title says it all ...

MySQL, delete and index hint

I have to delete about 10K rows from a table that has more than 100 million rows based on some criteria. When I execute the query, it takes about 5 minutes. I ran an explain plan (the delete query converted to select * since MySQL does not support explain delete) and found that MySQL uses the wrong index. My question is: is there any wa...

How do I automatically delete an Excel file after creating it on a server and returning it to the user?

Hello, I am creating an Excel file on a web server, using OleDb to connect the the physical (well as physical as it can be) file and appending records. I am then returning a FilePathResult to the user via MVC, and would like to delete the physical file afterwards due to data protection concerns over the appended records. I have tried u...

jQuery ajax delete script not actually deleting.

I have a little personal webapp that I'm working on. I have a link that, when clicked, is supposed to make an ajax call to a php that is supposed to delete that info from a database. For some unknown reason, it won't actually delete the row from the database. I've tried everything I know, but still nothing. I'm sure it's something incred...

SharePoint form-based authentication problem with itemDeleting event?

Hi! I have a SharePoint site (I'm the farm administrator with full control over the farm and site) and I used Windows authentication. I had a event receiver feature installed which manage add/update/delete for my lists to have custom behavior. Everything worked ok on Windows Authentication. But... now I am using form-based authenticati...

How do you DELETE rows in a mysql table that have a field IN the results of another query?

here's what the statement looks like: DELETE FROM videoswatched vw2 WHERE vw2.userID IN ( SELECT vw.userID FROM videoswatched vw JOIN users u ON vw.userID=u.userID WHERE u.companyID = 1000 GROUP BY userID ) that looks decent to me, and th...

How to **delete-protect** a file or folder on Windows Server 2003 and onwards using C#/Vb.Net?

Hi all, Is it possible to delete-protect a file/folder using Registry or using a custom written Windows Service in C#? Using Folder Permissions it is possible, but i am looking for a solution that even restricts the admin from deleting specific folders. The requirement is that the administrator must not be easily track the nature of p...

How do you delete the default database/schema in hsqldb

I've created an in memory hsqldb and am using the default database/schema. Now I want to drop and recreate the database programatically. How do I do that? Thanks Daniel ...

How do you delete a contact in android 2.0?

I tried int totalDeleted = cr.delete(ContactsContract.Contacts.CONTENT_URI, where, new String[]{contactId}); but it does not work. Can I directly delete a contact without deleting the raw contacts tied to the contact? or Do I need to delete all the raw contacts first? thanks before hand ...

delete all files and folders in multiple directory but leave the directoy

well i like this nice of code right here it seems to work awsome but i cant seem to add any more directories to it DirectoryInfo dir = new DirectoryInfo(@"C:\temp"); foreach(FileInfo files in dir.GetFiles()) { files.Delete(); } foreach (DirectoryInfo dirs in dir.GetDirectories()) { dirs.Delete(true); } i would also like to ...

script to delete all /n number of lines starting from a word except last line

how to delete all lines below a word except last line in a file. suppose i have a file which contains | 02/04/2010 07:24:20 | 20-24 | 26 | 13 | 2.60 | | 02/04/2010 07:24:25 | 25-29 | 6 | 3 | 0.60 | +---------------------+-------+------------+----------+-------------+ 02-04-2010-07:24 --- ER...

Deleting in WPF TreeView jumps to parent

I tried the solution discussed here: http://stackoverflow.com/questions/2030678/wpf-treeview-itemselected-moves-incorrectly-when-deleting-an-item however, I'm still seeing the selection jump to that parent when deleting an item. What am I doing wrong? MainWindow.xaml <Window x:Class="TreeViewDelete.MainWindow" xmlns="http://schema...

c++ new & delete and functions

This is a bit unclear to me... So, i if i have a function: char *test(int ran){ char *ret = new char[ran]; // process... return ret; } and then call it multiple times: for(int i = 0; i < 100000000; i++){ char *str = test(rand()%10000000+10000000); // process... // delete[] str; // do i have to delete it here? } ...

c++ new & delete and string & functions

Okay the previous question was answered clearly, but i found out another problem. What if i do: char *test(int ran){ char *ret = new char[ran]; // process... return ret; } And then run it: for(int i = 0; i < 100000000; i++){ string str = test(rand()%10000000+10000000); // process... // no need to delete...

C equivalent of C++ delete[] (char *)

What is the C equivalent of C++ delete[] (char *) foo->bar; Edit: I'm converting some C++ code to ANSI C. And it had: typedef struct keyvalue { char *key; void *value; struct keyvalue *next; } keyvalue_rec; // ... for ( ptr = this->_properties->next, last = this->_properties; ptr!=NULL; last = ptr, ptr = ptr->ne...

mySQL: Deleting with JOIN ?

Hi everybody, This problem is giving me a real headache. I have two tables in my database that solves sorting of categories with the help of a design called "Closure table". The first table is called categories, and the other one is named categoriesPaths. Categories is simply a language-based table: id | name ---------------- 0 | C...

deleting an object

Hi, First, when you want to free the memory assigned to an object in C++, which one is preferred? Explicitly calling destructor or using delete? Object* object = new Object(...); ... delete object; OR object->~Object(); Second, does the delete operator call the destructor implicitly? Thanks, ...

DELETE records without associated ones.

I have a 'guests' table and 'invitations' table bound with many-to-one relationship in a postgreSQL database. I have removed some guests and now I want to remove invitations that have no guests. I tried using 'COUNT', but aggregates are not allowed in WHERE clause. ...

Winforms - Datagridview, disable button/row

Hi folks, I have a datagridview on a form with some data. The 1st column contains button for deleting the row. How can we disable this button or the entire row based on some condition, so the row cannot be deleted? TIA ...

When I remove rows in Cassandra I delete only columns not row keys

Hi, If I delete every keys in a ColumnFamily in a Cassandra db using remove(key), then if I use get_range_slices, rows are still there but without columns. How could I remove entire rows? Thanks Tobia Loschiavo ...