Hello,
I have wasted my whole afternoon on this so any help is greatly appreciated.
Table Schema
Table Name: file_manager_folder
Rows: id , parentId, name
My query simulates moving a folder into another folder and accepts an array using IN(?).
I want my update to only 'move' a folder if there is not already a folder with the same...
Using T-SQL, I would like to execute an UPDATE statement that will SET columns only if the corresponding variables are defined.
Here's a simple pseudo-tsql example of what I'm trying to accomplish:
--Declaring vars
@ID int,
@Name nvarchar(20),
@Password nvarchar(10)
--Run the update
UPDATE User
SET
IF LEN(@NAME) > 0
Name = @Name,
...
What would be considered best practice for updates when using LINQ:
To have an instantiated db/facade
object, and submit all changes to a
record in one go?
To have a static db/facade object,
and submit changes cell by cell?
Right now I'm in a project where each cell for a record has its own static update method
public static void Ce...
We have a simple SQL Server database with an ASP.NET front end.
I can easily update a record from my browser.
Another person cannot: he edits the field and hits the "update" button, but the change is not propagated to the database. The old value remains. He is using Internet Explorer. I checked the database, and his change is not propa...
Let say we are developing a new client/server Java web application. We finally released 1.0 version and sold to few clients. Clients deployed our project on their own at their servers. After some time we found a few bugs and we would like to update our application.
Is there any framework / technology / pattern / library / server that ca...
Hi Intellects,
I've two tables :
table_1 - ControlID, Code,
ReportedDate, FiledDate Age,
AgeCategory, etc.,
table_2 - ControlID, Code,
ReportedDate, FiledDate etc.,
ControlID in table_1 is Foreign key whereas not in table_2. I need to update ReportedDate in table_1 with ReportedDate in table_2 and Age and AgeCatogory ha...
[Edit: forget this post - I'm not sure what NHibernate is doing, but it's not doing what I just said it's doing. Please ignore.]
I have a 'parent' class in the object graph called Case.
Here's a snapshot of Case:
public class Case
{
public virtual Person Deceased {get;set;}
public virtual IList Executors { get; set; }
public Ca...
Hi all
Let's say you have two classes, Person and Address.
Person has a reference to Address like this:
public class Person
{
public virtual Address Residence {get;set;}
}
Address has an override of .Equals which determines whether two Address instances represent the same physical address (by comparing postcode and first line, say...
I have a Case class which exposes a Person object as follows:
public class Case
{
public virtual Person Deceased {get;set;}
}
I have a PersonalAsset class which also exposes a Person:
public class PersonalAsset
{
public virtual Person Owner {get;set;}
}
Assuming I write the following code within an ISession:
Case case = new Ca...
I have two tables, t1 and t2 with two columns each - id_user and age.
How do I update t1.age to the greatest of t1.age and t2.age for matching ID's and leave t1.age unchanged if there is no matching ID in t2.
Before update:
t1
+-------+---+
|id_user|age|
+-------+---+
| 1| 5|
+-------+---+
| 2| 10|
+-----...
This is how you set the defaultValue with a string:
sqlDataSource.UpdateParameters["Active"].DefaultValue = tbActive.Text;
How do you do something similar to the code below so that my sqlDataSource can accept an updated image?
FileUpload fuRoom1 = (FileUpload)gvRoom.Rows[e.RowIndex].FindControl("UploadedFile11");
byte[] image...
Hello,
After I upload a photo to a server, I want to save it in the user's database in MySQL, but for some reason, it is not working. Below is the code for uploader.php:
session_start();
if(!$_SESSION['userid']) {
header("Location: index.php");
exit;
}
$con = mysql_connect("host","db","pw");
if (!$con)
{
die('Could not conne...
I'm about to create the update system for .NET CF application. It is going to be a manual update system, customer will be able to "check for available updates" and install them.
There will be one global update server for about 500-5000 devices.
The application will be distributed as a zip compressed folder. The client application will ...
Hi
I have this page contains 3 draggable divs.
I'm using JQuery to drag these divs on the page.
Now when I drag them to different positions.
their attributes values should be changed to the new positions.
for example when the page loads the first div value:
<div style='position:absolute;left:1px;top:1px;'>
after I drag the box ...
Hi!
I have the problem:
I have some controls on a form (a check-box, a combo-box, a slider, a text-box). Their values are bound to different properties of the view model.
When a property of the view model has a certain value, I
want these control to be "fixed" (a error message is displayed and they are set to some fixed value (e.g: the ...
Hi all. I have an existing table 'people_table', with a field 'full_name'.
Many records have the 'full_name' field populated with incorrect casing. e.g. 'fred Jones' or 'fred jones' or 'Fred jones'.
I can find these errant entries with:
SELECT * FROM people_table WHERE full_name REGEXP BINARY '^[a-z]';
Q. How can I capitalize the...
With more than a little help from daviderossi.blogspot.com I have managed to get some code working to replace an xml value with another
This give me the following output which both edits the value at the 'ix' position BUT also adds a second copy at the end. If I search for it with LastIndexOf and delete it then it deletes the first occu...
The perforce command:
p4 sync -n
will display the results of the sync (update in subversion) without actually performing the sync.
I've been looking in the svn help pages and googling around for a tag/command in subversion that will do the same but have yet to find one. I was thinking there may be a tag for svn update that would acco...
A colleague of mine (I promise it was a colleague!) has left an update running on our main SQL Server since last Thursday (yes that's right folks, we're pushing 100 hours now!). The SQL in question (in one transaction, I might add) is:
update daily_prices set min_date = (select min(a.date)
from daily_prices a
where a.key ...
HI I'm building a php based website and wanted to know if there any way to allow my client to upload their content from a word document (or any word file)?
The upload should replace (or add) content to a page, allowing her to update her content. I know this is some sort of cms, but I don't know where to begin.
I currently have an artic...