update

If a data model changes (an object) whats the best approach to also update the database ?

Let's say theres a Teacher object and that Teachers holds a list of Courses objects. The courses for the Teacher can change. Some get added, some get deleted. What's the best approach to update this changes in the database. 1. Right after every change, update the database. e.g.: A course get added, immediately add that into the database ...

wpf c# status window update

Hello I am trying to create a status window which content(textbox) should change in a lengthy operation. This status window is called and updated from the main application. Unfortunately, the content is updated only at the finish of the operation. I am using VS2008, C# and WPF. Thank you. ...

Methods to achieve first, previous, next and last navigation

I'm new to programming and have a question about navigation. What are the various methods that can achieve a "First", "Previous", "Next" and "Last" navigation, as seen in article or comic based sites? (Admittedly the "First" link isn't confusing as it can stay static, but what about the others?) For example, on the 50th page, the links w...

Doctrine: How to do a UPDATE with a SELECT MIN subquery?

Hi, I have a photos table where users can have multiple photos. I'm trying to create the following query: $q = Doctrine_Query::create() ->update('Photo p') ->set('p.photo_type', 1) ->where('p.user_id = ?', $id) ->andWhere('p.date_added = (SELECT MIN(p.date_added) FROM Photo p WHERE p.user_id = ?)', $id) The idea is to se...

How to grant permissions to single SELECT/UPDATE statment (sql server) ?

I have a problem when trying to execute this update statement (below) using C# SqlCommand when I execute it locally it works fine, but when deployed to another machine I got a permission error The SELECT permission was denied on the object Order ... The UPDATE permission was denied on the object Order ... Update Statement UPDATE Orde...

Update Web Reference in Visual Studio

Hi, I have inherited a web site project that makes use of a number of WCF Web Services hosted on a BizTalk server. We have two environments that I need to deploy this project to, with different URLs for the different BizTalk servers. i.e. In the Staging environment, I need to point the services at xx.xx.xx.101 In the Live environment, ...

C# UpdateProgress which displays a variable from the running code ?

I have an updateprogress in my aspx file, which has a "label control" in it with a text "Loading...", while I run my code, there is a "for loop" in my code. While this loop continues, I want to show the current row number in my update progress, so that user can see how much rows left until it ends. How can I do that ? Thanks. ...

Entity Framework Update existing foreign Key reference to another

Hi, I have two tables Team_DATA and Driver_PROFILE_DATA in an SQL database. For every driver_profile there can be many teams. So there's a one-to-many relation on the driver_profile to team_data table. I want to update a team_data foreign key reference in the Driver_profile table of an already existing record to another team_data rec...

last_update timestamp for every table?

Is it a good practice to have timestamps for the last row update in every table? Or should they only be set where really needed? How do I know where I will need an update timestamp later? For which kind of information do they make sense? ...

Problem to open SMS after deleting another with my widget...

Hi! It is the last problem I have before finishing my widget so I beg you to help me! I've created a widget wich can navigate in SMS/Inbox, and deleting them... When I delete one at the position 5 for example, this one is deleted, the other next are at the position before and the messages before the one deleted don't change of position.....

Android - how update widget often but only when it is visible?

I'm going to create widget which needs to update its content every minute (it shows time-related data). However, there is no need to update widget if it is currently invisible, which means: screen is turned off another app is running widget is placed on another (invisible) home screen tab What is the best way to update only visible ...

google app engine: new version doesn't appear

I have made an update on Google App Engine with a small fix and I got: Closing update: new version is ready to start serving. However, when I open the website, there is still old version. I have changed version to 2 in app.yaml, before running update. What am I missing? ...

Update Table, Where Column Name is selected dynamically - DropDown.SelectedValue, C#, VB.NET

Hi, I want to Update Column of a Table where ColumnName will be DropDown.SelectedValue. Example: A set of RECORDS will be displayed from a Customer Table where CUstNo ='1234' and City= 'Chicago' and Grade ='B' Once displayed I want to Update the grade to 'A' of all those customers from the above criteria. In My case I have like 100...

Changing IDs and updating tables.

We are trying to bring two different databases together but both databases are using the same IDs. Different info but we would have two users with same ID. Is there a way that we can change the IDs in one database and then update each of the tables using that ID? ...

Updating a free App requires paying if the update is not free?

Hi, I have a free App that I am about to update. After the update it will not be free anymore. People who got my App while it was free - will they have to pay in order to get the new paid version? Thanks. ...

after running insert or update query, need the last inserted record and compare in vb.net sql server

i have 2 queries in vb.net with an if clause - if x=0 then insert into table1 else update table1 both queries have 5 fields. now what i want to do is after this insert or update takes place, i need to look at this inserted/updated record and compare it with another table (table2). Especially for update, i have 5 fields in both tables. i...

MS-Access: SQL for updating a column in a table

Hi, I have the following table in an access database id VisitNo Weight 1 1 100 1 2 95 1 3 96 1 4 94 1 5 93 Now row 2 and 4 are deleted. So i have... id VisitNo Weight 1 1 100 1 3 96 1 5 93 However what i need is......

ASP.NET Update Control from another one through an "Object"

Hi I want to achive the following behavior: when a user clicks on a button in an control some data will be processed in background and another control from the page will be updated when the job is finished (both controls are in updatepanels (or not) -> doesn't work anyway). My code looks something like this: Control1 (which makes the ...

SQL syntax error in Update statement VB.net

Hi, Im getting a strange syntax error when I run this in VB SQLString = "UPDATE Login SET Password = '" + PasswordTextBox.Text + "'" SQLString += " WHERE UserName = '" + UserNameTextBox.Text + "'" The Username is checked before getting to this part and is definitly in the db. It gives an exception saying syntax error ...

VS2008 MSInstaller update to different directory fails

I use Visual Studio 2008 Installer Project to create a MSI Installer. With the software I deploy and install a Service. I added the primary output of the service project to the custom actions (Install, Commit, Rollback, Uninstall) of the Installer. First I had problems updating the Software (Error 1001. The Service already exists). The...