Hi All,
I have a small excel program.
I would like to be able to use this program to update a SQL table.
What would be the function to say update line 2 in SQL table Test in Database ABC
Thanks
I need to update multiple rows with different values.Is it possible to do in mysql?
ie,some thing like this
UPDATE landing_page SET (rotation_slot_begin='0',rotation_slot_end='0.333333333333' where landing_pageid=265),(rotation_slot_begin='0.333333333333',rotation_slot_end='0.666666666667' where landing_pageid=267),(rotation_slot_begin='0.666666666667',rotation_slot_end='1' where landing_pageid=268)
but this query is not working.I think something like this.Anybody can help me please
I have the following tables:
Student
Student_Course
Course
Now when I create a student I only want to create a user and add a row to student_course.
The "problem" I have is that when I set the set of courses in Student to cascade="save-update" that an update is also invoked on course. I was wondering if there was a way to prevent this.
I get multiple text files daily to update my database from my client side and I am not a DBA expert. Every day I update it manually. Is there any method I can use to make this easier? I think there is a way to automate it but I don't know exactly what to do.
Is it possible to request data from an other controller in cakePHP?
For example, i created 2 folders in pages called search and update (both with a index.ctp) and a controller and model in the correct folders.
Both pages are using a different db source, and i wnat to display some data from the search controller into the view of the update page..
Is this possble?
Regards,
Swen
i would like to update the numbers i've added to an array from variables, when those variables change. is it possible change these variables and have the array update automatically?
var first:Number = 1;
var second:Number = 2;
var myArray:Array = new Array(first, second);
first = 3;
second = 4;
trace(myArray) //outputs 1,2
I have 2 tables:
Table A: code | name
Table B: barcode | name
Table B has full barcode and name, Table A has only code.
I need to run update query that fill name in Table A.
I tried something like:
update A set name = (select top 1 Name from B where B.Code = mid(A.Barcode,1,8))
but it doesn't work.
i have a 5 stars rating system, on javascript!!! bau i want to update mysql table, when clicking on stars!!! can somebody tell me how can i update the table!!!
thanks. . .
Hi,
i have two tables
Order(id, date, note)
and
Delivery(Id, Note, Date)
I want to create a trigger that updates the date in Delivery when the date is updated in Order.
I was thinking to do something like
CREATE OR REPLACE TRIGGER your_trigger_name
BEFORE UPDATE
ON Order
DECLARE
BEGIN
UPDATE Delivery set date = ??? where id = ???
END;
How do I get the date and row id?
thanks
Hello,
I've a self join table when I delete or update it's id I want to delete or update all the direct and indirect affected records
SQL server does not allow this type of cycle cascading I've decided to use triggers but this triggers will file recursively and they will be terminated at 34 level and I don't know the depth of records and event I disable the trigger and re enable it after completing the process how can I construct a SQL statement that achieve this logic?
Hi All,
I am using the following code to show confirmation dialog box after finishing some update process in database. but it is not working for me.
code:
string javaScript = "<script language=JavaScript>\n " + "if(confirm('Do you want to update
the files?'))window.location.href = \"Upload.aspx?ID=" + ID +
"&pt=Gm&page=Gms\"; else return false;\n" + "</script>";
RegisterStartupScript("imbtnUpdate_Click", javaScript);
I'm back with another Flex/Flash security question. I've already received some help from the community on this topic, but I'm still not quite sure this is the best way to do.
Here's the thing. A flex web app, a lot of users (1000+), custom configuration of the application depending of the user group. Can I make this thing safe... or safer.
For the moment, when a user comes to the application, there is only one configuration possible, but for the next version we've implented a multi-configuration protocol, this way :
1. The user connect to Default.aspx, server code process the windows credentials (whe are on intranet) and give the correct xml configuration file.
2. The flex app loads with the xml conf file as a flashvar and then the app 'builds' itself with the content of the xml file.
As we know, since this is a flex application the swf is downloaded on the client computer and the xml file too. If more than one user connects to the app, from the same computer, the can possibly see the other xml file in the windows temp folder.
The current directory of the application looks that way :
Web site
|-> default.aspx
|-> index.swf
|-> configAdmin.xml
|-> configUserType1.xml
|-> configUserType2.xml
|-> com
|-> a lot of swf and xml files
I was first thinking making another directory (without read access for the client) containing all the configurations xml files, picking the right one, copying it to the client and deleting it afterwards. But it seems like I must let know the user know when downloading/deleting content on it's computer...
I'm running out of ideas, so I hope you have some great ones. It's there are some design flaws (in the way the app is build, not in Flash :p) please share. I'm always looking forward to improve.
Thanks
Update :
In browser Flash/Flex (without AIR that is) doesn't allow deleting file localy silently (on the client computer, where the application is). It's also not yet possible to get session data.
Hi All,
I am using the following code to show confirmation dialog box after finishing some update process in database. but it is not working for me.
code:
protected void imbtnUpdate_Click(object sender, ImageClickEventArgs e)
{
// Database process
string javaScript = "<script language=JavaScript>\n " + "if(confirm('Do you want to update
the files?'))window.location.href = \"Upload.aspx?ID=" + ID +
"&pt=Gm&page=Gms\"; else return false;\n" + "</script>";
RegisterStartupScript("imbtnUpdate_Click", javaScript);
}
I have a form that is divided into two classes. Each class represents the widgets on part of the form. What is the best way to allow these classes to share data between each other and update each other.
Example:
Button in class A is clicked. Update text field in class C
i would like to update the numbers i've added to an array from variables, when those variables change. is it possible change these variables and have the array update automatically?
var first:Number = 1;
var second:Number = 2;
var myArray:Array = new Array(first, second);
first = 3;
second = 4;
trace(myArray) //outputs 1,2
Hi there,
I am developing an iPhone app, which now can update Twitter account with GPS coordinates in real-time, by the Twitter API link: http://username:[email protected]/statuses/update.xml , and I am looking at how to make my own database to accept updates from iPhone, via a similar API page.
It seems a .php page can serve as the API, and MySQL can serve as the database.
What are the good ways of doing it? Any template code and tutorial please?
i have a properties file (under rsources folder) in which i'm stocking a variable (key=value),
i need to update it when a user insert a new value or update the older one , so can i do it ?
i have doubts because it's a web application so it' simply a war deployed in the server so how it is possible to access the .properties file and change it directly from the code .
if it's not possible is there another solution ?
Any Help will be apprecited
Many thanks
I have a series of python scripts with execute permissions in Linux. They are stored in SVN.
If I then run svn up to update them, the overwritten files are back to 644 - ie no execute permissions for anyone.
Yes I could just script it to chmod +x * afterwards, but surely there's a way to store permissions in SVN or to maintain them when you update?
Any suggestions appreciated.
I have an Iterator that I use on a HashMap, and I save and load the iterator.
is there a way to get the previous key in the HashMap with Iterator? (java.util.Iterator)
Update
I save it as an attribute in a Red5 connection and then load it back to continue working where i stopped.
Another update
I'm iterating through the keyset of the HashMap
I have two basic SQL Server tables:
Customer (ID [pk], AddressLine1, AddressLine2, AddressCity, AddressDistrict, AddressPostalCode)
CustomerAddress(ID [pk], CustomerID [fk], Line1, Line2, City, District, PostalCode)
CustomerAddress contains multiple addresses for the Customer record.
For each Customer record I want to merge the most recent CustomerAddress record where most recent is determined by the highest CustomerAddress ID value.
I've currently got the following:
UPDATE Customer
SET
AddressLine1 = CustomerAddress.Line1,
AddressPostalCode = CustomerAddress.PostalCode
FROM Customer, CustomerAddress
WHERE
Customer.ID = CustomerAddress.CustomerID
which works but how can I ensure that the most recent (highest ID) CustomerAddress record is selected to update the Customer table?
I want to be able to update two sets of identical buttons with one function. Also I don't want to update all the buttons, only some of them.
Can I have a function like this?:
-(void) updateFields{
updateButton1 : (Bool) x
updateButton2 : (Bool) y
updateButton3 : (Bool) z }
The implementation will look like this:
[button1_1 setEnabled:x];
[button1_2 setEnabled:x]; //called only if updateButton1 is given an argument
[button2_1 setEnabled:y];
etc...
I am trying to make a real-time data collection application that has timed task. Each task can have a different or the same update period. I would like to store the task with the common update period in a list where I can iterate through it and call the function that I registered in the list. How would I go about adding callbacks to a data structure like a list or vector? Can I store slots in them?
I'm following this tutorial: http://huuah.com/android-progress-bar-and-thread-updating/
to learn how to make progress bars. I'm trying to show the progress bar on top of my activity and have it update the activity's table view in the background.
So I created an async task for the dialog that takes a callback:
package com.lib.bookworm;
import android.app.ProgressDialog;
import android.content.Context;
import android.os.AsyncTask;
public class UIThreadProgress extends AsyncTask<Void, Void, Void> {
private UIThreadCallback callback = null;
private ProgressDialog dialog = null;
private int maxValue = 100, incAmount = 1;
private Context context = null;
public UIThreadProgress(Context context, UIThreadCallback callback) {
this.context = context;
this.callback = callback;
}
@Override
protected Void doInBackground(Void... args) {
while(this.callback.condition()) {
this.callback.run();
this.publishProgress();
}
return null;
}
@Override protected void onProgressUpdate(Void... values) {
super.onProgressUpdate(values);
dialog.incrementProgressBy(incAmount);
};
@Override
protected void onPreExecute() {
super.onPreExecute();
dialog = new ProgressDialog(context);
dialog.setCancelable(true);
dialog.setMessage("Loading...");
dialog.setProgress(0);
dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
dialog.setMax(maxValue);
dialog.show();
}
@Override
protected void onPostExecute(Void result) {
super.onPostExecute(result);
if (this.dialog.isShowing()) {
this.dialog.dismiss();
}
this.callback.onThreadFinish();
}
}
And in my activity, I do:
final String page = htmlPage.substring(start, end).trim();
//Create new instance of the AsyncTask..
new UIThreadProgress(this, new UIThreadCallback() {
@Override
public void run() {
row_id = makeTableRow(row_id, layout, params, matcher); //ADD a row to the table layout.
}
@Override
public void onThreadFinish() {
System.out.println("FINISHED!!");
}
@Override
public boolean condition() {
return matcher.find();
}
}).execute();
So the above creates an async task to run to update a table layout activity while showing the progress bar that displays how much work has been done..
However, I get an error saying that only the thread that started the activity can update its views. I tried doing:
MainActivity.this.runOnUiThread(new Runnable() {
@Override public void run() {
row_id = makeTableRow(row_id, layout, params, matcher); //ADD a row to the table layout.
}
}
But this gives me synchronization errors.. Any ideas how I can display progress and at the same time update my table in the background?
Currently my UI looks like:
Hiya.
I have an Iterator that I use on a hashmap, and i save and load the iterator.
is there a way to get the previous key in the hashmap with Iterator? (Java.Util.Iterator)
update
I save it as an attribute in a Red5 connection and then load it back to continue working where i stopped.
another update
I'm iteratoring through the keyset of the hashmap
Hiya.
I have an Iterator that I use on a HashMap, and i save and load the iterator.
is there a way to get the previous key in the HashMap with Iterator? (java.util.Iterator)
Update
I save it as an attribute in a Red5 connection and then load it back to continue working where i stopped.
Another update
I'm iteratoring through the keyset of the HashMap