update

How can I update data with RRDtool?

I am using RRDtool for storing data for displaying graphs. I update the RRD by RRDs::update and this fails when trying to rewrite the information, means update data for a time in the past (e.g. someone moved the system timer back). The error I get is: ERROR: Cannot update /opt/dashboard/rrd/Disk/192.168.120.168_disk_1.rrd with '12280...

SqlSelect: Update if exists, Insert if not - With date part comparison?

I need to update a record in a database with the following fields [ID] int (AutoIncr. PK) [ScorerID] int [Score] int [DateCreated] smalldatetime If a record exists for todays date (only the date portion should be checked, not the time) and a given scorer, I'd like to update the score value for this guy and this day. If the scorer do...

Simple SQL code evades me.. Unionize two mismatched tables.

I'm selecting 1 field from 1 table and storing it into a temp table. Sometimes that table ends up with 0 rows. I want to add that field onto another table that has 20+ fields Regular union won't work for me because of the field # mismatch. Outer wont work for me because there is nothing to compare. NVL doesn't work on the first temp t...

Yet another About ajax.net update panels performance thread

Good day, we just moved from asp.net 1.1 to asp.net 2.0. We are using ajax update panels. In an Apress book (Pro asp.net 2008) , I've read that when you use the updatepanel, you don't reduce the acount of bandwidth sent, because the entire page is still sent. That in mind, I've also read on many websites that it is better to use mult...

Writing an update query in asp.net (access database) (visual basic)

I have this code: Dim pathString As String = HttpContext.Current.Request.MapPath("Banking.mdb") Dim odbconBanking As New OleDbConnection _ ("Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" + pathString) Dim sql As String sql = "UPDATE tblAccounts balance = " & CDbl(balance + value) & " WHE...

Updating through openquery

I'm trying to update something in postgresql from sql server 2000 through openquery like following. UPDATE OPENQUERY(odbcname, 'SELECT name FROM person where id=1') SET name='bla' Here's the error I'm getting. "OLE DB provider 'MSDASQL' reported an error. [OLE/DB provider returned message: the content was changed before updating] OLE ...

Very strange SQL update issue

I have a table called ApprovalTasks... Approvals has a status column I also have a view called ApprovalsView When I try a straight update : update ApprovalTasks set Status = 2 where ApprovalTaskID = 48 I'm getting this error message: Msg 2601, Level 14, State 1, Line 1 Cannot insert duplicate key row in object 'dbo.ApprovalsView' ...

How To Update Data With Linq By Attach Method

I have a update method in my data layer such this: public clacc datalayerSec_User private objUIData as new UIData Public Function Update(ByVal objUser As SEC_USER) As Boolean Try objUIData.SEC_USERs.Attach(objUser) objUIData.Refresh(RefreshMode.KeepCurrentValues, objUser) objUIData.SubmitChanges(ConflictMode.ContinueOnConf...

UPDATE query works fine when run from Access, but raises SQL syntax error from within C# app

I have a very simple Update statement that will update mail server settings and network credentials info... Query works fine when I run it in Access but C# keeps giving me the error stating that my SQL Syntax is wrong ... I have a dataaccess layer (dal class) and Update instance method pasted belows ... But the problem must be sth else c...

Update syntax for Access

I need to update a field (which is currently empty) based on a match with another table. This should be simple, but my syntax is wrong. In SQLServer 2005, the syntax would be UPDATE Facilities-NOID SET Facilities-NOID.ID = Facilities-ID.ID FROM Facilities-NOID, Facilities-ID WHERE [Facilities-ID].[Structure ID] = [Facilities-NOID].[S...

LINQ - Update null integer data field

I have got a field with data type int? price and allow null, when I set book.price = null; and update, it is not saved and does not throw any exceptions, when I change value # null, it is ok. I want set it null, plz help. ...

Update in Oracle

I need to update the comments field in a table for a large list of customer_ids. The comment needs to be updated to include the existing comment and appending some text and the password which is in another table. I'm not quite sure how to do this. Here is some code that does this for a single customer id. How would I go about doing t...

Best way to keep GUI updated when the underlying SQL view data changes?

Let's say you have a form with a component that displays data from a view on an SQL server. The component would be something like a ListView or DataGrid - basically something that can display the data in a 2D grid format. Another application changes the data that the SQL view describes, and does this regularly but at undefined intervals....

Sql, selecting and updating

Hi, I am trying to select 100s of rows at a DB that contains 100000s of row and update those rows afters. the problem is I don't want to go to DB twice for this purpose since update only marks those rows as "read". is there any way I can do this in java using simple jdbc libraries? (hopefully without using stored procedures) update: ...

My SQL sproc with an update

I have a stored procedure that is used when a new transaction is inserted. This procedure inserts properly into the transactions table but I also need to update another related table based on inserted values. Based on the Product_ID I need to update PT_Pct_to_Salon in a table called 'Salon' with a value from a table called 'Zen_Product...

What is the benefit of update instead of doing delete and then Insert in the same table.

Hi, I have a table say example "ABC", I have a row that needs to be stored in to this "ABC" table. I plan to update it instead of doing delete from the table and then insert. What is the impact that this will make on database? In, table level, page level, time, cost and every thing. thanks Thiru ...

Overwrite executable in C:\Program\MyProg on Windows Vista

I would like my program to update itself (downloading a new exe and/or some other files from ftp) and I used the recipe in the accepted answer to this question. Recap: Rename running program to old-mp.exe Download the update as mp.exe directly Restart the program This works great for windows XP. On vista there is a problem, as the us...

Confused how to write this simple UPDATE/INSERT

OK, I'm confused how to write an INSERT/UPDATE for this simple app I'm developing locally to learn more about db interactions. I have an "edit" page, which is populated from the db and lists up to 9 user links (user_id 2 in this case), so something like: <input type="text" name="link1" value="www.yahoo.com"> <input type="text" name="...

maven look for new versions of dependencies

Is there any way to make maven look for new versions of dependencies? for example, i have commons-lang commons-lang 2.3 version 2.4 could be out, I dont know. i'd rather not check is manually(by writting 2.4 in this case), because i have many dependencies. I think i saw some trick to make maven use latest ...

C# Update combobox bound to generic list

Hello! I have a combobox on my form that is bound to a generic list of string like this: private List<string> mAllianceList = new List<string>(); private void FillAllianceList() { // Add alliance name to member alliance list foreach (Village alliance in alliances) { mAllianceList.Add(alliance.AllianceName); } ...