update

MySQL UPDATE values with sequence 1,2,3, ...

Hello, I have table with position atribute 'posit' with unknown values (in my example '0') and I want to UPDATE it to 1,2,3, ... BEFORE: _______________ | title | posit | |---------------| | test | 0 | |-------|-------| | test | 0 | |-------|-------| | test | 0 | |-------|-------| | test | 0 | '---------------' ...

Update Statement in SQLCommand does not work

Hi All, if have the following SQLCommand which should do an Update. The issue is, that I get no errors but it still do not update the database ? SqlConnection sqlconn2 = new SqlConnection(this.connectionString); sqlconn2.Open(); string strCmd = "UPDATE dbo.mydata SET WEB_OBEZ1 = @OBEZ1, WEB_OBEZ2 = @OBEZ2, WEB_...

Network sent Vector only updates once in client?

Okay, so I'm trying to send a vector of objects from server to client. the clients take control of one object from the vector and send it's x and y to the server vector. Now the server is running fine from what I can tell. things are updating in real time, but the client only seems to update right once - when it starts. this is the cli...

What happens when I update SQL column to itself? -OR- simplified conditional updates?

I would like to call an "update" stored procedure which won't necessarily include all columns. There is probably a better way to handle this.... As you can see, if I do not pass in the column parameters their value is NULL. Then, using the ISNULL, I set the columns either to their new values or their existing values. CREATE PROCEDURE [d...

optimize mysql database - myISAM db

i have two question about msyql performance with my db using MyISAM engine : 1) what is smart way to solve the problem that when INSERT or UPDATE some rows in one table, many SELECT queries be hang on. 2) Is this easy to change from MyISAM to InnoDB with database is current running? 3) Why myISAM is still be default option of mySQL w...

2 selectboxes one for updating the other onclick cakephp

Hello, I have a form callled "Project", it contains a selectbox with the names of the companies , the other selectbox is hidden and is called "Staff" and is to be made visible and filled with the names and ids of users that are working for the selected company. >>selectbox "Company" visible | >>selectbox "Staff" hidden -----------...

How can I update my Twitter status with Perl and only LWP::UserAgent?

I'm trying to update my status through the Twitter API and OAuth. I get stuck on the last step, the status update. Here's my code. The header: $ua->default_header('Content-Type' => "application/x-www-form-urlencoded"); $ua->default_header('oauth_signature' => "$signature"); $ua->default_header('Authorization' => '"OAuth realm="Twitter...

How can I avoid file locks when updating a windows service?

I have a service that gets updated automatically by another service. The updating service downloads the latest version, shuts down the service (waiting for the stopped status), copies in new files, and starts it back up again. Lately, though, it's getting an access denied error when trying to copy the executable file. This is similar to ...

High CPU - What to do.

Hello everyone i have a high CPU problem with MYSQL using "top" ( linux ) shows cpu peaks of 90%. I was trying to find the source of the problem, turned on general log and slow query log, The slow query log did not find anything. The Db contains a few small tables and one large table that contains almost 100k rows, Database Engine is ...

Using an IN clause in Vb.net to save something to the database using SQL

Hello, I have a textbox and a button on a form. I wish to run a query (in Vb.Net) that will produce a query with the IN Values. Below is an example of my code myConnection = New SqlConnection("Data Source=sqldb\;Initial Catalog=Rec;Integrated Security=True") myConnection.Open() myCommand = New SqlCommand("UPDATE dbo.Recordings SET S...

How to change database design in a deployed application?

Situation I'm creating a C#/WPF 4 application using a SQL Compact Edition database as a backend with the Entity Framework and deploying with ClickOnce. I'm fairly new to applications using databases, though I don't suspect I'll have much problem designing and building the original database. However, I'm worried that in the future I'll ...

Eclipse RCP: P2 Update feature fails

I have a prodcut that include 1 feature (application.feature) that contains one plugin with application this feature has, in included feature, another one (framework.feature) if I update framework.feature and one of its plugin I got this error (I use "install new software" to get the correct error, because if I just try to update I go ...

update with join statement mysql?

Is this possible in mysql? update table1 set column1 = (select column1 from table2 inner join table3 where table2.column5 = table3.column6); Here is a a similar question for an Oracle DB. ...

Grails: Updating a single object in a domain, ".save" Vs ".executeUpdate"

I'm wondering what the most efficient way of updating a single value in a domain class from a row in the database. Lets say the domain class has 20+ fields def itemId = 1 def item = Item.get(itemId) itemId.itemUsage += 1 Item.executeUpdate("update Item set itemUsage=(:itemUsage) where id =(:itemId)", [usageCount: itemI...

Having trouble updating an attribute with an association attached to it

I have two models here: Package and Status Package belongs_to status Status has_many packages So, my Package model has a status_id column In my Packages controller, I've got this method (that receives data from an ajax POST call): def edit_status @status = Status.find_by_name(params[:status]) Package.update(params[:id], :status_...

Mysql subquery, Update embedded into select?

Hi, I am doing a mysql injection on a site (for educational purpose i promise hehe), now, It uses mysql as its database, I cannot do: "; UPDATE..." so my question is, if i do: "OR id=(update...)".. as a subquery, that of course doesn't make any sense yet will it execute the update on the table i choose? ...

MySQL delete and update multiple rows

Say I have an entity A in one table and an arbitrary number of other entities B related to it in other table. I have a situation where I need to replace all those B entities with a list of new B entities in a way that there should be no duplicates. Simple way would be to issue a DELETE query first to remove all the old ones and then a...

How to persist a @OneToMany update with hibernate ?

Hi, in my application I've got users which have files. The UserVO has the following mapping: @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "users") public Set<Files> getFiles() { return this.files; } Then I have a HibernateDAO with the following update method: public void update(T vo) { try { ...

jQuery AJAX: update two parts of a page with scripts inside the response

Hello, I'm using jQuery AJAX to load (and refresh) a part of my page Here's the jQuery function in my main page: function updateCategories(){ catList = $('#cat_list'); catList.hide(); //send the post to shoutbox.php $.ajax({ type: "POST", url: "../ajax/products-categories.php", data: "action=refresh", co...

Updating a specific portion of a text file in java

In my program I need to update the Balance column of the text file each time the user does a withdrawal. I used both the write methods as well as the append methods, but to no avail. Once the user has logged in, that particular line is stored in the array #PIN AccountNo Balance 1598 01-10-102203-0 95000 4895 01-10-102248-0 45000 9512 0...