Search Results

Search found 17867 results on 715 pages for 'delete row'.

Page 14/715 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • How do I use on delete cascade in mysql?

    - by Marius
    I have a database of components. Each component is of a specific type. That means there is a many-to-one relationship between a component and a type. When I delete a type, I would like to delete all the components which has a foreign key of that type. But if I'm not mistaken, cascade delete will delete the type when the component is deleted. Is there any way to do what I described?

    Read the article

  • How to set alternate row color for an iterated table in php?

    - by chandru_cp
    I am using php and i am iterating a table with a result array ... I want to add row color and alternate row color to it.... How to do so? Any suggestion... <table id="chkbox" cellpadding="0" cellspacing="2" width="100%" class="table_Style_Border"> <tr> <td style="width:150px" class="grid_header" align="center">RackName</td> <td style="width:150px" class="grid_header" align="center">LibraryName</td> <td style="width:200px" class="grid_header" align="center">LibrarianName</td> <td style="width:200px" class="grid_header" align="center">Location</td> <td style="width:1%" class="grid_header"></td> </tr> <? if(isset($comment)) { echo '<tr> <td class=table_label colspan=5>'.$comment.'</td></tr>'; } ?> <?php foreach($rackData as $row) { ?> <tr> <td align="left" class="table_label"> <?=$row['rack_name']?> </td> <td align="left" class="table_label"> <?=$row['library_name']?> </td> <td align="center" class="table_label"> <?=$row['librarian']?> </td> <td align="center" class="table_label"> <?=$row['location']?> </td> <td align="center"> <input type="checkbox" name="group" id="group" value="<?=$row['rack_id']?>" onclick="display(this);" > </td> </tr> <? } ?> <table>

    Read the article

  • How can records be deleted without activating the delete trigger?

    - by Servaas Phlips
    Hello there, Since about a month we are experiencing records that are disappearing from our database without any reason. (part of) Our database structure is at http://i.imgur.com/i15nG.png Now users and credentials can never be deleted. We noticed however that thanks to our backups that unfortanetely users disappeared from the database. The users and credentials that disappear appear to be completely random. In order to find out which application deletes this records we created triggers with the following checks: CREATE TRIGGER Credential_SoftDelete ON [Credential] INSTEAD OF DELETE AS DECLARE @message nvarchar(255) DECLARE @hostName nvarchar(30) DECLARE @loginName nvarchar(30) DECLARE @deletedId nvarchar(30) SELECT @deletedId=credentialid FROM deleted; SELECT @hostName=host_name,@loginName=login_name FROM sys.dm_exec_sessions WHERE session_id=@@SPID; SELECT @message = '[FAULT] Credential : ' + USER_NAME() + ' deleted ' +@deletedId + ' on ' + @@SERVERNAME + ' from [' + @hostname + ' by ' + @loginName; EXEC xp_logevent 50001,@message,ERROR GO Now after we added this trigger we hoped to find out which application deletes these credentials by searching in the log files. Unfortanetely the credentials are still deleted and the trigger Credential_SoftDelete is never logged. I did try run a delete on the database where the trigger is installed and where the users have disappeared. I ran the following query on the database: DELETE FROM [User] WHERE userid=296 and the trigger prevented deletion of this user and also logged this in the log events. This was actually on exact the same database where the users disappeared. (so no test copy or something like that) Please note that we also use replication, the type of replication we use is merge replication. How is this possible? Can the fact that we use replication on this database be the cause of this problem?

    Read the article

  • how do i check if multiple folders exist if so delete them on button click?

    - by NightsEVil
    hi i have a few folders created by my application and id like that when they click a button named "clean up" that it would check to see if any of the predetermined folders exist, if they do then delete them, this is what i have tried so far whats wrong with it? string tempFolder = Environment.GerFolderPath(Environment.SpecialFolder.ApplicationData); if (Directory.Exists(tempFolder + "//" + "temp1")) if (Directory.Exists(tempFolder + "//" + "temp2")) if (Directory.Exists(tempFolder + "//" + "temp3")) if (Directory.Exists(tempFolder + "//" + "temp4")) { System.IO.Directory.Delete(tempFolder + "\\" + "temp1", true); System.IO.Directory.Delete(tempFolder + "\\" + "temp2", true); System.IO.Directory.Delete(tempFolder + "\\" + "temp3", true); System.IO.Directory.Delete(tempFolder + "\\" + "temp4", true); } else { MessageBox.Show("No Cleanup Needed"); } so whats wrong? i tested it and it seemed to with 2 folder but not 4 or more

    Read the article

  • Delete Perl install files?

    - by Bjorn
    I have a VPS that is managed and am mysteriously running out of space, I think I found a few files I can delete. So just double checking it's ok to delete the Perl install files: /root/perl588installer.tar.gz (pretty sure this can go) /root/perl588installer/ (wasn't sure if this can go, I'm thinking it's just used when perl is installed) I rarely install this kind of thing myself but when I do I'm sure you can delete these files. Thanks

    Read the article

  • SQL SERVER – DELETE, TRUNCATE and RESEED Identity

    - by pinaldave
    Yesterday I had a headache answering questions to one of the DBA on the subject of Reseting Identity Values for All Tables. After talking to the DBA I realized that he has no clue about how the identity column behaves when there is DELETE, TRUNCATE or RESEED Identity is used. Let us run a small T-SQL Script. Create a temp table with Identity column beginning with value 11. The seed value is 11. USE [TempDB] GO -- Create Table CREATE TABLE [dbo].[TestTable]( [ID] [int] IDENTITY(11,1) NOT NULL, [var] [nchar](10) NULL ) ON [PRIMARY] GO -- Build sample data INSERT INTO [TestTable] VALUES ('val') GO When seed value is 11 the next value which is inserted has the identity column value as 11. – Select Data SELECT * FROM [TestTable] GO Effect of DELETE statement -- Delete Data DELETE FROM [TestTable] GO When the DELETE statement is executed without WHERE clause it will delete all the rows. However, when a new record is inserted the identity value is increased from 11 to 12. It does not reset but keep on increasing. -- Build sample data INSERT INTO [TestTable] VALUES ('val') GO -- Select Data SELECT * FROM [TestTable] Effect of TRUNCATE statement -- Truncate table TRUNCATE TABLE [TestTable] GO When the TRUNCATE statement is executed it will remove all the rows. However, when a new record is inserted the identity value is increased from 11 (which is original value). TRUNCATE resets the identity value to the original seed value of the table. -- Build sample data INSERT INTO [TestTable] VALUES ('val') GO -- Select Data SELECT * FROM [TestTable] GO Effect of RESEED statement If you notice I am using the reseed value as 1. The original seed value when I created table is 11. However, I am reseeding it with value 1. -- Reseed DBCC CHECKIDENT ('TestTable', RESEED, 1) GO When we insert the one more value and check the value it will generate the new value as 2. This new value logic is Reseed Value + Interval Value – in this case it will be 1+1 = 2. -- Build sample data INSERT INTO [TestTable] VALUES ('val') GO -- Select Data SELECT * FROM [TestTable] GO Here is the clean up act. -- Clean up DROP TABLE [TestTable] GO Question for you: If I reseed value with some random number followed by the truncate command on the table what will be the seed value of the table. (Example, if original seed value is 11 and I reseed the value to 1. If I follow up with truncate table what will be the seed value now? Here is the complete script together. You can modify it and find the answer to the above question. Please leave a comment with your answer. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • How to delete just one LINE of text (NOT a table-row!) with a single KEYBOARD shortcut in Microsoft Office Word 2010?

    - by Sk8erPeter
    Are there any shortcuts to delete just one row (which is NOT a table row, just a single row in a text) in Microsoft Office Word 2010? If not, how can I assign one to do it? In worst case, can I make a macro (in VB) which could do the same with a custom shortcut? To clarify my problem: I would like to avoid multiple clicks and/or pushing multiple buttons, even if I click in the middle of the line of text. :) For example, in Notepad++ I can delete the entire current line with Ctrl+L, in NetBeans, I can delete an entire line with Ctrl+E, in Eclipse, I can delete current line with Ctrl+D, etc., where it doesn't really matter where my mouse cursor is actually... so there are these simple solutions, which I look for in Word too. It really would simplify my work in huge documents.

    Read the article

  • OneNote: How to delete a notebook

    - by Sahil Malik
    SharePoint, WCF and Azure Trainings: more information I’m filing this under the absurdity of stupid design. Or perhaps, we didn’t really use it ourselves before releasing it. I’m talking about OneNote the metro app. Beautiful app, beautiful concept, until of course, you feel like deleting the default notebook it creates for you. Why would anyone want to delete that of course! Hell everyone would want to! It’s the first damned thing you’d do. How do you delete a section? There is a button at the bottom.How do you delete a page? Well just like section, there is a button at the bottom. So you wish to delete a notebook? There is no button at the bottom. That’d be no fun of course! Here is how, Read full article ....

    Read the article

  • Delete button in Ubuntu One Notes

    - by Jean MC13
    For the whishlist... The 'delete button' in Ubuntu One Notes is exactly in the same place as the 'save' button. So I saved a long note, but as my finger clicked two times on the save button, the second click was on the 'delete' one ! Lost without return possible. <:-(( This annoying feature could easily be changed : - put the delete button in another place - before deleting : ask for confirmation - offer a way to cancel ('undelete' function)

    Read the article

  • How to delete vssver2.scc and global.asax from my Windows Server?

    - by rlb.usa
    I have a Windows server that I SFTP into, and I have some very old vssver2.scc files on there. They are used by Visual Source Safe- which is no longer used (SVN instead now). I want to delete them. Most troubling though is a very old global.asax file used by ASP.NET applications - since the app is compiled, it reads from it's global.dll in the Bin folder, and not the global.asax. I want to get rid of it. But I can't - and I can't overwrite it in favor of a newer one either. These files have 444 (Owner:r Group:r Public:r) permission and when I try to give them 777 (O:rwx G:rwx P:rwx) permission hoping it will let me delete them, it goes back to 444.

    Read the article

  • Shows how to make your GridViews row-selectable and how to bind to a row's detail.

    How to make an ASP.NET GridView row-selectable and how to bind selected row detail to other controls. The key "trick" to learn is to be able to add an onclick javascript event to each row in the grid that will fire the intrinsic ASP.NET __doPostBack() method.  read moreBy Peter BrombergDid you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Create shortcut key to insert new row using Excel 2010

    - by Dave Jarvis
    Tried to create a macro in Excel to insert a row: Sub InsertRow() ' ' InsertRow Macro ' ' Keyboard Shortcut: Ctrl+Shift+I ' Selection.EntireRow.Insert End Sub However, this does not insert a new row without first manually selecting a row. Every solution I've found requires that a row be highlighted before inserting a new row. See also: http://www.shortcutworld.com/en/win/Excel_2010.html How would you create a shortcut key (e.g., Ctrl+Shift+J) to highlight the current row and insert a new row? Thank you! Update Looks like Shift+Space highlights the current row.

    Read the article

  • How do I delete Windows.old in Windows 7?

    - by CRK
    I used to run Windows 7 32 bit, but installed the 64 bit version because of a RAM upgrade. During the installation I got this message: The partition you selected might contain files from a previous Windows installation. If it does, these files and folders will be moved to a folder named Windows.old. You will be able to access the information in Windows.old, but you will not be able to use your previous version of Windows. The C:\ drive now has two (2) Windows folders: Windows (15.3 GB) Windows.old (15.7 GB) Don't see why I need the Windows.old taking over 15GB of space on my hard drive so I tried to delete it. It didn't work. How can I safely delete this folder?

    Read the article

  • How do I recursively delete all files or folders whose names match a pattern in Windows?

    - by zylstra
    For the file example, I would like to delete all files matching .+?[a-f0-9]{4}.html (i.e. any html file ending in a four digit hexadecimal). So paged47c.html would be deleted, but page.html would remain. For the folder example, I would like to delete all folders matching .+?[A-Z]+ (i.e. any folder containing a capital letter). So some-folderSE93_89ds/ would be deleted, but some-folder/ would remain. I don't work much with the command line, but I could probably get an example involving "del" to work for me. Alternatively, is there a simple GUI program for Windows that would do this?

    Read the article

  • What is the most likely cause to a Blue Screen of Death when the user presses Ctrl-Alt-Delete?

    - by Jay
    My wife is experiencing this with her work laptop--she presses Ctrl-Alt-Delete to lock and she gets the BSOD. The first troubleshooting step is usually to "re-image", and it's locked down. So with this question, I am asking whether the behavior is unique enough that someone in the stack-universe knows exactly what this is (something I can tell her to tell her help desk support). Update: help desk said to order more RAM. Alt-tabbing caused the same behavior today. And...she learned that multiple users are affected. I'm not sure I'll be able to clean any additional info that will help w/ troubleshooting. I'll leave the question here for a bit and if an answer ends up being the actual solution, I'll accept it. If not, I think I should probably remove the question (i'll check meta). Update #2.5: The cause appears to be a ctrl-alt-delete keystroke while Sales Team Configurator is open. This can either be to lock the screen (there are workaround in answers already present) or to unlock the screen (no workaround for that).

    Read the article

  • IntegrityError: foreign key violation upon delete

    - by Lukasz Korzybski
    I have Order and Shipment model. Shipment has a foreign key to Order. class Order(...): ... class Shipment() order = m.ForeignKey('Order') ... Now in one of my views I want do delete order object along with all related objects. So I invoke order.delete(). I have Django 1.0.4, PostgreSQL 8.4 and I use transaction middleware, so whole request is enclosed in single transaction. The problem is that upon order.delete() I get: ... File "/usr/local/lib/python2.6/dist-packages/django/db/backends/__init__.py", line 28, in _commit return self.connection.commit() IntegrityError: update or delete on table "main_order" violates foreign key constraint "main_shipment_order_id_fkey" on table "main_shipment" DETAIL: Key (id)=(45) is still referenced from table "main_shipment". I checked in connection.queries that proper queries are executed in proper order. First shipment is deleted, after that django executes delete on order row: {'time': '0.000', 'sql': 'DELETE FROM "main_shipment" WHERE "id" IN (17)'}, {'time': '0.000', 'sql': 'DELETE FROM "main_order" WHERE "id" IN (45)'} Foreign key have ON DELETE NO ACTION (default) and is initially deferred. I don't know why I get foreign key constraint violation. I also tried to register pre_delete signal and manually delete shipment objects before delete on order is called, but it resulted in the same error. I can change ON DELETE behaviour for this key in Postgres but it would be just a hack, I wonder if anyone has a better idea what's going on here. There is also a small detail, my Order model inherits from Cart model, so it actually doesn't have id field but cart_ptr_id and after DELETE on order is executed there is also DELETE on cart, but it seems unrelated? to the shipment-order problem so I simplified it in the example.

    Read the article

  • Django IntegrityError: foreign key violation upon delete

    - by Lukasz Korzybski
    I have Order and Shipment model. Shipment has a foreign key to Order. class Order(...): ... class Shipment() order = m.ForeignKey('Order') ... Now in one of my views I want do delete order object along with all related objects. So I invoke order.delete(). I have Django 1.0.4, PostgreSQL 8.4 and I use transaction middleware, so whole request is enclosed in single transaction. The problem is that upon order.delete() I get: ... File "/usr/local/lib/python2.6/dist-packages/django/db/backends/__init__.py", line 28, in _commit return self.connection.commit() IntegrityError: update or delete on table "main_order" violates foreign key constraint "main_shipment_order_id_fkey" on table "main_shipment" DETAIL: Key (id)=(45) is still referenced from table "main_shipment". I checked in connection.queries that proper queries are executed in proper order. First shipment is deleted, after that django executes delete on order row: {'time': '0.000', 'sql': 'DELETE FROM "main_shipment" WHERE "id" IN (17)'}, {'time': '0.000', 'sql': 'DELETE FROM "main_order" WHERE "id" IN (45)'} Foreign key have ON DELETE NO ACTION (default) and is initially deferred. I don't know why I get foreign key constraint violation. I also tried to register pre_delete signal and manually delete shipment objects before delete on order is called, but it resulted in the same error. I can change ON DELETE behaviour for this key in Postgres but it would be just a hack, I wonder if anyone has a better idea what's going on here. There is also a small detail, my Order model inherits from Cart model, so it actually doesn't have id field but cart_ptr_id and after DELETE on order is executed there is also DELETE on cart, but it seems unrelated? to the shipment-order problem so I simplified it in the example.

    Read the article

  • How do I permanently delete e-mail messages in the sendmail queue and keep them from coming back?

    - by Steven Oxley
    I have a pretty annoying problem here. I have been testing an application and have created some test e-mails to bogus e-mail addresses (not to mention that my server isn't really set up to send e-mail anyway). Of course, sendmail is not able to send these messages and they have been getting stuck in the sendmail queue. I want to manually delete the messages that have been building up in the queue instead of waiting the 5 days that sendmail usually takes to stop retrying. I am using Ubuntu 10.04 and /var/spool/mqueue/ is the directory in which every how-to I have read says the e-mails that are queued up are kept. When I delete the files in this directory, sendmail stops trying to process the e-mails until what appears to be a cron script runs and re-populates this directory with the messages I don't want sent. Here are some lines from my syslog: Jun 2 17:35:19 sajo-laptop sm-mta[9367]: o530SlbK009365: to=, ctladdr= (33/33), delay=00:06:27, xdelay=00:06:22, mailer=esmtp, pri=120418, relay=e.mx.mail.yahoo.com. [67.195.168.230], dsn=4.0.0, stat=Deferred: Connection timed out with e.mx.mail.yahoo.com. Jun 2 17:35:48 sajo-laptop sm-mta[9149]: o4VHn3cw003597: to=, ctladdr= (33/33), delay=2+06:46:45, xdelay=00:34:12, mailer=esmtp, pri=3540649, relay=mx2.hotmail.com. [65.54.188.94], dsn=4.0.0, stat=Deferred: Connection timed out with mx2.hotmail.com. Jun 2 17:39:02 sajo-laptop CRON[9510]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -n 200 -r -0 rm) Jun 2 17:39:43 sajo-laptop sm-mta[9372]: o52LHK4s007585: to=, ctladdr= (33/33), delay=03:22:18, xdelay=00:06:28, mailer=esmtp, pri=1470404, relay=c.mx.mail.yahoo.com. [206.190.54.127], dsn=4.0.0, stat=Deferred: Connection timed out with c.mx.mail.yahoo.com. Jun 2 17:39:50 sajo-laptop sm-mta[9149]: o51I8ieV004377: to=, ctladdr= (33/33), delay=1+06:31:06, xdelay=00:03:57, mailer=esmtp, pri=6601668, relay=alt4.gmail-smtp-in.l.google.com. [74.125.79.114], dsn=4.0.0, stat=Deferred: Connection timed out with alt4.gmail-smtp-in.l.google.com. Jun 2 17:40:01 sajo-laptop CRON[9523]: (smmsp) CMD (test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp) Does anyone know how I can get rid of these messages permanently? As a side note, I'd also like to know if there is a way to set up sendmail to "fake" sending e-mail. Is there?

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >