update

SQL update Query

We have combined primary key with fields no, id and groupno From Access, a WHERE condition such as WHERE no = '' & groupno = '' executes faster while the same thing slows down updates in SQL. Once we have provided individual index of no & groupno, will it be faster? Does it consider it as a combined key if we provide primary key with ...

Best practice updating a website

Hello, currently my work-flow is as follows: Locally on a machine I maintain a git repo on each website I am working on, when the time comes to publish something I compress the folder and upload this single file to the production server via ssh then I decompress, test the changes a move the changes to the live folder and I get rid of t...

What are accepted practices regarding deploying apps to unattended servers?

I am deploying my app onto a Windows box, that will live in a remote location with no one, who is computer literate, around. The box will be accessible via the internet via the LogMeIn application. So it is fair to say, that no one will physically touch the server for long periods of time. And the app must be up and running 24/7 and c...

prototype.js 1.6.0.3 Ajax.Updater not working in IE7 or IE8. Help Please!

This works on all other browsers...but fails on IE7 & IE8. Help Please! <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <script src="/javascripts/prototype.js" type="text/javascript" charset="utf-8"></script> </head> <body> <input type="button" value="Ajax Test" onclick="var myAjax = new Ajax.Updater(...

Check from .NET if Windows Update is enabled

Is there any way to check from .NET if windows update is enabled? I want to prompt the users every time they log into my app that their computer might be at risk and give them a link to windows update website (or windows update application from control panel). Preferably it should work on XP, Vista and Windows 7. Maybe there is a regis...

DRY LINQ statements for tables with common columns

Here's an interesting problem. Is there a way to write some code using LINQ to SQL which is capable of performing a table UPDATE knowing only that the table it is given contains columns x, y, z but not knowing at compile time which table it is dealing with? I have several tables in my DB schema which share some columns and I need to app...

Creating a flexible update query

Hello, I'm trying to create an flexible update query. I have now something like this: $lsQuery = "UPDATE `"; $lsQuery .= $psTableName; $lsQuery .= " SET "; foreach($psValues as $lsKey => $lsValue) { $lsQuery .= $lsKey; $lsQuery .= " = '"; $lsQuery .= $lsValue; $lsQuery .= "' AND "; } $lsQuery .= "` "; $l...

Updating a Web Application in IIS - Best practices

What are the best practices for updating a web application in IIS? The first page you see when you visit our application is a login page. What I want to achieve is that visitors be redirected to a page stating that the application is being updated. And for users with an admin role being able to login successfully (to check whether ever...

Can you force activerecord associations to update without saving them?

I have a couple models which are associated with the has_many belongs_to pair. For the sake of demonstration, a client has one server but a server has many clients. I might do something like this: client1.server = the_server client2.server = the_server client3.server = the_server My actual application is quite a bit more complex tha...

PriorityQueue/Heap Update

Does Java have an easy way to reevaluate a heap once the priority of an object in a PriorityQueue has changed? I can't find any sign of it in Javadoc, but there has to be a way to do it somehow, right? I'm currently removing the object then re-adding it but that's obviously slower than running update on the heap. ...

python dict update diff

Does python have any sort of built in functionality of notifying what dictionary elements changed upon dict update? For example I am looking for some functionality like this: >>> a = {'a':'hamburger', 'b':'fries', 'c':'coke'} >>> b = {'b':'fries', 'c':'pepsi', 'd':'ice cream'} >>> a.diff(b) {'c':'pepsi', 'd':'ice cream'} >>> a.update(b...

Delphi CMExit message not sent when modal dialog is closed?

In one part of the application I'm working on, there is a form control that does validation on reception of the CMExit message, which is exactly how the Delphi documentation says to do it (this code sample is from the Delphi Help files): procedure TDBCalendar.CMExit(var Message: TWMNoParams); begin try FDataLink.UpdateRecord; ...

What are best practices for self-updating PHP+MySQL applications?

It is pretty standard practice now for desktop applications to be self-updating. On the Mac, every non-Apple program that uses Sparkle in my book is an instant win. For Windows developers, this has already been discussed at length. I have not yet found information on self-updating web applications, and I hope you can help. I am building...

mysql + update top n

I've got a query like this: update table set status = 1 where status = 2; but I'd only like to do this to the top 400. I tried adding a 'limit 0, 400' (like I would in a query) but that didn't work. I did some searching and mysql doesn't seem to support the TOP(n) command as sql server does. Any idea how I'd do this? edit: fo...

LiveUpdate for a .NET service

I am building a .NET based windows service. Part of its functionality is supposed to be checking if a newer version of itself is available on a site. It is then supposed to download the new "package" and somehow upgrade itself. Anyone know of any libraries that can help with that? I am assuming I will run into issues of overwriting the e...

SQL update with a join?

I have two tables. One is simple string/ID look up: StrTable: str_key String 0 'a' 1 'b' where the strings are unique. The other is more complex, and includes the shared string_id ValTable: str_key other_key val 0 0 1.234 0 1 1.567 1 0 1.890 Now, I want to do an update on Va...

Updating text from textfield from one scene to other

Hi All, I am having a problem in placing data(textField text) from one scene to another scene. I'm attaching my source code with this mail. Please help me if anything wrong in my code. // // PlayerSettingsAppDelegate.m // PlayerSettings // // // #import "PlayerSettingsAppDelegate.h" #import "TestScene.h" NSString *result; ...

Using stored procedures results in update statement

I've got a table with two columns(among others): id and created_in_variant and a stored procedure that calculates the created_in_variant value basing on the id. I'd like to do something like this: UPDATE [dbo].[alerts] SET [created_in_variant] = find_root [id] Is there a nice way to do it? ...

How can I efficiently do a database massive update?

I have a table with some duplicate entries. I have to discard all but one, and then update this latest one. I've tried with a temporary table and a while statement, in this way: CREATE TABLE #tmp_ImportedData_GenericData ( Id int identity(1,1), tmpCode varchar(255) NULL, tmpAlpha3Code varchar(50) NULL, tmpRelatedYear ...

What is the fastest way to update many rows of data with different values in sql server

My company recently had a problem where we needed to update 64,000+ rows of data fairly regularly, where each row would be update with unique values. I have come up with a good answer, which I am posting here for others' reference, but also to find feedback if there are other solutions. Clarification : Each row has unique values that a...