How Can I use Mysql's  PROCEDURE by Java Can you give me sample???

�������^���������������H�iBEGIN�`END�u���b�N�j�@��TOP
ORACLE�@MSSQL�@SSA�@MySQL�@
���{�I���������������������������B
MySQL�������A ORACLE��MSSSQL��������������BEGIN�`END�u���b�N�����s�������������������������B
���������s�������������K���X�g�A�h�v���O�����������R���p�C�������K�v�����������B
�i�����F�������������������A���w�E�������������K�r�����������j
--drop PROCEDURE sp_hoge;
--�f���~�^�����X��������
delimiter //
CREATE PROCEDURE sp_hoge()
DETERMINISTIC
BEGIN
/* �������� */
DECLARE mystr VARCHAR(20);
DECLARE mycnt INTEGER(2);
/* �l������ */
SET mycnt = 0;
SET mystr = '����';
/* IF�� */
IF mycnt = 0 THEN
SET mystr = '�����Q';
select mystr;
ELSE
select '�����R';
END IF;
/* CASE�� */
CASE extract(month from now())
WHEN 1 THEN SET mystr = '1��';
WHEN 2 THEN SET mystr = '2��';
WHEN 3 THEN SET mystr = '3��';
WHEN 4 THEN SET mystr = '4��';
ELSE SET mystr = '1�`4�����O';
END CASE;
select mystr;
/* WHILE-LOOP */
WHILE mycnt <= 5 DO
SET mycnt = mycnt + 1;
select mycnt;
END WHILE;
/* BEGIN-END�u���b�N������SELECT�������s */
/* PROCEDURE�������\�iFUNCTION���������������j */
select * from help_topic;
END//
delimiter ;
--�X�g�A�h�v���V�[�W�����s
call sp_hoge();
�X�g�A�h�v���V�[�W�����T���v���i�J�[�\�����g�p������LOOP�����j�@��TOP
ORACLE�@MSSQL�@SSA�@MySQL�@
�J�[�\�����g�p����LOOP�������T���v�������B
�����p�����[�^���w�����������������Y�������������������A���E���w�X�^�b�t�x�������������A�����������w�c���X�^�b�t�F�x���\���������B
--drop PROCEDURE sp_hoge;
--�f���~�^�����X��������
delimiter //
CREATE PROCEDURE sp_hoge(inum INTEGER(3))
DETERMINISTIC
BEGIN
/* �������� */
/* �J�[�\���g�p�����f�[�^�L�����f���g�p */
DECLARE done INT DEFAULT 0;
/* �������O������ */
DECLARE v_mystr VARCHAR(20);
/* �J�[�\���g�p�� */
DECLARE v_empnm VARCHAR(40);
DECLARE v_job VARCHAR(20);
/* �J�[�\������ �� �����������������`���� */
DECLARE cur1 CURSOR FOR
select empnm,job from kemp where deptno = inum;
/* �f�[�^��������LOOP�E�o�p���������� */
DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;
/* �J�[�\���I�[�v�� */
OPEN cur1;
/* LOOP */
LOOPPROC:REPEAT
FETCH cur1 INTO v_empnm,v_job;
IF NOT done THEN
IF v_job = '�X�^�b�t' THEN
SET v_mystr = '�c���X�^�b�t�F';
ELSE
SET v_mystr = '';
END IF;
select CONCAT(v_mystr,v_empnm);
/* ������������LOOP���E�o����������LEAVE�� */
/* LEAVE LOOPPROC; */
END IF;
UNTIL done END REPEAT;
/* �J�[�\���N���[�Y */
CLOSE cur1;
END//
--�f���~�^���Z�~�R�����i�f�t�H���g�j������������
delimiter ;
--�X�g�A�h�v���V�[�W�����s
call sp_hoge(1);
12.2. Control Flow Functions
CASE value WHEN [compare_value] THEN result [WHEN [compare_value] THEN result ...] [ELSE result] END
CASE WHEN [condition] THEN result [WHEN [condition] THEN result ...] [ELSE result] END
The first version returns the result where value=compare_value. The second version returns the result for the first condition that is true. If there was no matching result value, the result after ELSE is returned, or NULL if there is no ELSE part.
mysql> SELECT CASE 1 WHEN 1 THEN 'one'
-> WHEN 2 THEN 'two' ELSE 'more' END;
-> 'one'
mysql> SELECT CASE WHEN 1>0 THEN 'true' ELSE 'false' END;
-> 'true'
mysql> SELECT CASE BINARY 'B'
-> WHEN 'a' THEN 1 WHEN 'b' THEN 2 END;
-> NULL
The default return type of a CASE expression is the compatible aggregated type of all return values, but also depends on the context in which it is used. If used in a string context, the result is returned as a string. If used in a numeric context, then the result is returned as a decimal, real, or integer value.
Note: The syntax of the CASE expression shown here differs slightly from that of the SQL CASE statement described in Section 17.2.10.2, �gCASE Statement�h, for use inside stored routines. The CASE statement cannot have an ELSE NULL clause, and it is terminated with END CASE instead of END.
IF(expr1,expr2,expr3)
If expr1 is TRUE (expr1 <> 0 and expr1 <> NULL) then IF() returns expr2; otherwise it returns expr3. IF() returns a numeric or string value, depending on the context in which it is used.
mysql> SELECT IF(1>2,2,3);
-> 3
mysql> SELECT IF(1<2,'yes','no');
-> 'yes'
mysql> SELECT IF(STRCMP('test','test1'),'no','yes');
-> 'no'
If only one of expr2 or expr3 is explicitly NULL, the result type of the IF() function is the type of the non-NULL expression.
expr1 is evaluated as an integer value, which means that if you are testing floating-point or string values, you should do so using a comparison operation.
mysql> SELECT IF(0.1,1,0);
-> 0
mysql> SELECT IF(0.1<>0,1,0);
-> 1
In the first case shown, IF(0.1) returns 0 because 0.1 is converted to an integer value, resulting in a test of IF(0). This may not be what you expect. In the second case, the comparison tests the original floating-point value to see whether it is non-zero. The result of the comparison is used as an integer.
The default return type of IF() (which may matter when it is stored into a temporary table) is calculated as follows:
Expression Return Value
expr2 or expr3 returns a string string
expr2 or expr3 returns a floating-point value floating-point
expr2 or expr3 returns an integer integer
If expr2 and expr3 are both strings, the result is case sensitive if either string is case sensitive.
Note: There is also an IF statement, which differs from the IF() function described here. See Section 17.2.10.1, �gIF Statement�h.
IFNULL(expr1,expr2)
If expr1 is not NULL, IFNULL() returns expr1; otherwise it returns expr2. IFNULL() returns a numeric or string value, depending on the context in which it is used.
mysql> SELECT IFNULL(1,0);
-> 1
mysql> SELECT IFNULL(NULL,10);
-> 10
mysql> SELECT IFNULL(1/0,10);
-> 10
mysql> SELECT IFNULL(1/0,'yes');
-> 'yes'
The default result value of IFNULL(expr1,expr2) is the more �ggeneral�h of the two expressions, in the order STRING, REAL, or INTEGER. Consider the case of a table based on expressions or where MySQL must internally store a value returned by IFNULL() in a temporary table:
mysql> CREATE TABLE tmp SELECT IFNULL(1,'test') AS test;
mysql> DESCRIBE tmp;
-------------------------------------------+
| Field | Type | Null | Key | Default | Extra |
-------------------------------------------+
| test | char(4) | | | | |
-------------------------------------------+
In this example, the type of the test column is CHAR(4).
NULLIF(expr1,expr2)
Returns NULL if expr1 = expr2 is true, otherwise returns expr1. This is the same as CASE WHEN expr1 = expr2 THEN NULL ELSE expr1 END.
mysql> SELECT NULLIF(1,1);
-> NULL
mysql> SELECT NULLIF(1,2);
-> 1
Note that MySQL evaluates expr1 twice if the arguments are not equal.
Previous / Next / Up / Table of Contents
User Comments
Posted by I W on July 12 2005 5:52pm [Delete] [Edit]
Don't use IFNULL for comparisons (especially not for Joins)
(example:
select aa from a left join b ON IFNULL(a.col,1)=IFNULL(b.col,1)
It's terrible slow (ran for days on two tables with approx 250k rows).
Use <=> (NULL-safe comparison) instead. It did the same job in less than 15 minutes!!
Posted by [name withheld] on November 10 2005 12:12am [Delete] [Edit]
IFNULL is like oracle's NVL function (these should help people searching for NVL() ..)
Posted by Philip Mak on May 26 2006 7:14am [Delete] [Edit]
When using CASE, remember that NULL != NULL, so if you write "WHEN NULL", it will never match. (I guess you have to use IFNULL() instead...)
Posted by Marc Grue on June 24 2006 2:03pm [Delete] [Edit]
You can ORDER BY a dynamic column_name parameter using a CASE expression in the ORDER BY clause of the SELECT statement:
CREATE PROCEDURE `orderby`(IN _orderby VARCHAR(50))
BEGIN
SELECT id, first_name, last_name, birthday
FROM table
ORDER BY
-- numeric columns
CASE _orderby WHEN 'id' THEN id END ASC,
CASE orderby WHEN 'desc id' THEN id END DESC,
-- string columns
CASE orderby WHEN 'firstname' THEN first_name WHEN 'last_name' THEN last_name END ASC,
CASE orderby WHEN 'descfirst_name' THEN first_name WHEN 'desc_last_name' THEN last_name END DESC,
-- datetime columns
CASE _orderby WHEN 'birthday' THEN birthday END ASC,
CASE orderby WHEN 'desc birthday' THEN birthday END DESC;
END
Since the CASE expression returns the "compatible aggregated type of all return values", you need to isolate each column type in a separate CASE expression to get the desired result.
If you mixed the columns like
CASE _orderby
WHEN 'id' THEN id
WHEN 'first_name' THEN first_name
...etc...
END ASC
.. both the id and first_name would be returned as a string value, and ids would be sorted as a string to '1,12,2,24,5' and not as integers to '1,2,5,12,24'.
Note that you don't need a "ELSE null" in the CASE expressions, since the CASE expression automatically returns null if there's no match. In that case, you get a "null ASC" in your ORDER BY clause which doesn't affect the sort order. If for instance orderby is 'descfirst_name', the ORDER BY clause evaluates to:
ORDER BY null ASC, null DESC, null ASC, first_name DESC, null ASC, null DESC
Effectively the same as "ORDER BY first_name DESC". You could even add a new set of CASE expressions for a second order column (or more..) if you like.
Add your own comment.

What is that post supposed to be?

Similar Messages

  • Can we use MYSQL database with the UI5 application?

    Hey,
    I want to make an SAPUI5 application and there i have to use database to save the data.
    Then, i will retrieve the data from there. Can we use MYSQL as a database to save the data.
    If yes, then how we will retrieve the data from there?
    Regards
    VAIBHAV JAIN

    Hi Yury,
    There's a lot of new technologies in order to acchieve that. You could create this app components:
    1. Persistence layer. Hibernate/JPA connected to Relational ER Model in MySQL.
    2. Service layer. Restful Services. With Spring (Getting Started &amp;middot; Building a RESTful Web Service), Jersey (Jersey), etc.
    3. View Layer. SAPUI5. Consume your services.
    Hope this helps,
    Kind regards!

  • How can I use XStream to persist complicated Java Object  to XML & backward

    Dear Sir:
    I met a problem as demo in my code below when i use XTream to persist my Java Object;
    How can I use XStream to persist complicated Java Object to XML & backward??
    See
    [1] main code
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.util.ArrayList;
    import com.thoughtworks.xstream.XStream;
    import com.thoughtworks.xstream.io.xml.DomDriver;
    public class PhoneList {
         ArrayList<PhoneNumber> phones;
         ArrayList<Person> person;
         private PhoneList myphonelist ;
         private LocationTest location;
         private PhoneList(String name) {
         phones = new ArrayList<PhoneNumber>();
         person = new ArrayList<Person>();
         public ArrayList<PhoneNumber> getphones() {
              return phones;
         public ArrayList<Person> getperson() {
              return person;
         public void addPhoneNumber(PhoneNumber b1) {
              this.phones.add(b1);
         public void removePhoneNumber(PhoneNumber b1) {
              this.phones.remove(b1);
         public void addPerson(Person p1) {
              this.person.add(p1);
         public void removePerson(Person p1) {
              this.person.remove(p1);
         public void BuildList(){
              location = new LocationTest();
              XStream xstream = new XStream();
              myphonelist = new PhoneList("PhoneList");
              Person joe = new Person("Joe, Wallace");
              joe.setPhone(new PhoneNumber(123, "1234-456"));
              joe.setFax(new PhoneNumber(123, "9999-999"));
              Person geo= new Person("George Nixson");
              geo.setPhone(new PhoneNumber(925, "228-9999"));
              geo.getPhone().setLocationTest(location);          
              myphonelist.addPerson(joe);
              myphonelist.addPerson(geo);
         public PhoneList(){
              XStream xstream = new XStream();
              BuildList();
              saveStringToFile("C:\\temp\\test\\PhoneList.xml",convertToXML(myphonelist));
         public void saveStringToFile(String fileName, String saveString) {
              BufferedWriter bw = null;
              try {
                   bw = new BufferedWriter(
                             new FileWriter(fileName));
                   try {
                        bw.write(saveString);
                   finally {
                        bw.close();
              catch (IOException ex) {
                   ex.printStackTrace();
              //return saved;
         public String getStringFromFile(String fileName) {
              BufferedReader br = null;
              StringBuilder sb = new StringBuilder();
              try {
                   br = new BufferedReader(
                             new FileReader(fileName));
                   try {
                        String s;
                        while ((s = br.readLine()) != null) {
                             // add linefeed (\n) back since stripped by readline()
                             sb.append(s + "\n");
                   finally {
                        br.close();
              catch (Exception ex) {
                   ex.printStackTrace();
              return sb.toString();
         public  String convertToXML(PhoneList phonelist) {
              XStream xstream = new  XStream(new DomDriver());
              xstream.setMode(xstream.ID_REFERENCES) ;
              return xstream.toXML(phonelist);
         public static void main(String[] args) {
              new PhoneList();
    }[2].
    import java.io.Serializable;
    import javax.swing.JFrame;
    public class PhoneNumber implements Serializable{
           private      String      phone;
           private      String      fax;
           private      int      code;
           private      String      number;
           private      String      address;
           private      String      school;
           private      LocationTest      location;
           public PhoneNumber(int i, String str) {
                setCode(i);
                setNumber(str);
                address = "4256, Washington DC, USA";
                school = "Washington State University";
         public Object getPerson() {
              return null;
         public void setPhone(String phone) {
              this.phone = phone;
         public String getPhone() {
              return phone;
         public void setFax(String fax) {
              this.fax = fax;
         public String getFax() {
              return fax;
         public void setCode(int code) {
              this.code = code;
         public int getCode() {
              return code;
         public void setNumber(String number) {
              this.number = number;
         public String getNumber() {
              return number;
         public void setLocationTest(LocationTest bd) {
              this.location = bd;
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(location);
            f.getContentPane().add(location.getControls(), "Last");
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
         public LocationTest getLocationTest() {
              return location;
         }[3].
    package test.temp;
    import java.io.Serializable;
    public class Person implements Serializable{
         private String           fullname;
           @SuppressWarnings("unused")
         private PhoneNumber      phone;
           @SuppressWarnings("unused")
         private PhoneNumber      fax;
         public Person(){
         public Person(String fname){
                fullname=fname;           
         public void setPhone(PhoneNumber phoneNumber) {
              phone = phoneNumber;
         public void setFax(PhoneNumber phoneNumber) {
              fax = phoneNumber;
         public PhoneNumber getPhone() {
              return phone ;
         public PhoneNumber getFax() {
              return fax;
        public String getName() {
            return fullname ;
        public void setName(String name) {
            this.fullname      = name;
        public String toString() {
            return getName();
    }[4]. LocationTest.java
    package test.temp;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class LocationTest extends JPanel implements ChangeListener
        Ellipse2D.Double ball;
        Line2D.Double    line;
        JSlider          translate;
        double           lastTheta = 0;
        public void stateChanged(ChangeEvent e)
            JSlider slider = (JSlider)e.getSource();
            String name = slider.getName();
            int value = slider.getValue();
            if(name.equals("rotation"))
                tilt(Math.toRadians(value));
            else if(name.equals("translate"))
                moveBall(value);
            repaint();
        protected void paintComponent(Graphics g)
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            if(ball == null)
                initGeom();
            g2.setPaint(Color.green.darker());
            g2.draw(line);
            g2.setPaint(Color.red);
            g2.fill(ball);
        private void initGeom()
            int w = getWidth();
            int h = getHeight();
            int DIA = 30;
            int padFromEnd = 5;
            line = new Line2D.Double(w/4, h*15/16, w*3/4, h*15/16);
            double x = line.x2 - padFromEnd - DIA;
            double y = line.y2 - DIA;
            ball = new Ellipse2D.Double(x, y, DIA, DIA);
            // update translate slider values
            int max = (int)line.getP1().distance(line.getP2());
            translate.setMaximum(max);
            translate.setValue(max-padFromEnd);
        private void tilt(double theta)
            // rotate line from left end
            Point2D pivot = line.getP1();
            double lineLength = pivot.distance(line.getP2());
            Point2D.Double p2 = new Point2D.Double();
            p2.x = pivot.getX() + lineLength*Math.cos(theta);
            p2.y = pivot.getY() + lineLength*Math.sin(theta);
            line.setLine(pivot, p2);
            // find angle from pivot to ball center relative to line
            // ie, ball center -> pivot -> line end
            double cx = ball.getCenterX();
            double cy = ball.getCenterY();
            double pivotToCenter = pivot.distance(cx, cy);
            // angle of ball to horizon
            double dy = cy - pivot.getY();
            double dx = cx - pivot.getX();
            // relative angle phi = ball_to_horizon - last line_to_horizon
            double phi = Math.atan2(dy, dx) - lastTheta;
            // rotate ball from pivot
            double x = pivot.getX() + pivotToCenter*Math.cos(theta+phi);
            double y = pivot.getY() + pivotToCenter*Math.sin(theta+phi);
            ball.setFrameFromCenter(x, y, x+ball.width/2, y+ball.height/2);
            lastTheta = theta;  // save theta for next time
        private void moveBall(int distance)
            Point2D pivot = line.getP1();
            // ball touches line at distance from pivot
            double contactX = pivot.getX() + distance*Math.cos(lastTheta);
            double contactY = pivot.getY() + distance*Math.sin(lastTheta);
            // find new center location of ball
            // angle lambda = lastTheta - 90 degrees (anti-clockwise)
            double lambda = lastTheta - Math.PI/2;
            double x = contactX + (ball.width/2)*Math.cos(lambda);
            double y = contactY + (ball.height/2)*Math.sin(lambda);
            ball.setFrameFromCenter(x, y, x+ball.width/2, y+ball.height/2);
        JPanel getControls()
            JSlider rotate = getSlider("rotation angle", "rotation", -90, 0, 0, 5, 15);
            translate = getSlider("distance from end",  "translate", 0, 100, 100,25, 50);
            JPanel panel = new JPanel(new GridLayout(0,1));
            panel.add(rotate);
            panel.add(translate);
            return panel;
        private JSlider getSlider(String title, String name, int min, int max,
                                  int value, int minorSpace, int majorSpace)
            JSlider slider = new JSlider(JSlider.HORIZONTAL, min, max, value);
            slider.setBorder(BorderFactory.createTitledBorder(title));
            slider.setName(name);
            slider.setPaintTicks(true);
            slider.setMinorTickSpacing(minorSpace);
            slider.setMajorTickSpacing(majorSpace);
            slider.setPaintLabels(true);
            slider.addChangeListener(this);
            return slider;
    }OK, My questions are:
    [1]. what I generated XML by XSTream is very complicated, especially for object LocationTest, Can we make it as simple as others such as Person object??
    [2]. after I run it, LocationTest will popup and a red ball in a panel will dsiplay, after I change red ball's position, I hope to persist it to xml, then when I read it back, I hope to get same picture, ie, red ball stiil in old position, How to do that??
    Thanks a lot!!

    Positive feedback? Then please take this in a positive way: if you want to work on persisting Java objects into XML, then GUI programming is irrelevant to that goal. The 1,000 lines of code you posted there appeared to me to have a whole lot of GUI code in it. You should produce a smaller (much smaller) example of what you want to do. Calling the working code from your GUI program should come later.

  • Wether "CREATE TABLE"  can be used in storage procedure of Oracle?

    I am migrating MS SQL 2000 Database to Oracle 8.1.7. But I encounter a trouble, the defind sentences of temporary table in storage procedure of MS SQL can't be migrate to oracle.
    I have try two kinds of syntax to defind temporary table, but both of them can't pass the compiler of pl/sql. Two syntax that I have try as follows:
    1.CREATE TEMP TABLE chanp1(chanpid varchar(50))
    2.CREATE GLOBAL TEMPORARY TABLE chanp1(chanpid varchar(50))
    Now, I want to know whether "CREATE TABLE" sentence can be used in storage procedure of Oracle.

    you could use EXECUTE IMMEDIATE (Oracle8i above) or DBMS_SQL pacakge to do dynamic SQL.
    since you are already on Oracle8i 8.1.7 using EXECUTE IMMEDIATE may be more easy.

  • Can we use rownum in procedures?

    Hi,
    Can we use rownum in procedures"
    Thanks and regards
    Gowtham Sen.

    here is some examples that might be of help.
    SQL> set serveroutput on;
    SQL> create or replace procedure get_employee(p_empno number) as
      2    cursor c1(pEmpNo number) is
      3     select e.rn, e.empno, e.ename
      4       from (select rownum rn, empno, ename
      5               from emp
      6             order by empno) e
      7      where e.empno = pEmpNo;
      8  begin
      9    for c1_rec in c1(p_empno) loop
    10      dbms_output.put_line('The rownum is '||to_char(c1_rec.rn));
    11      dbms_output.put_line('The employee name is '||c1_rec.ename);
    12    end loop;
    13  end;
    14  /
    Procedure created.
    SQL> execute get_employee(7788);
    The rownum is 8
    The employee name is SCOTT
    PL/SQL procedure successfully completed.
    SQL> execute get_employee(7654);
    The rownum is 5
    The employee name is MARTIN
    PL/SQL procedure successfully completed.
    SQL>

  • How data strore using finder in a external disk can be transfere back to my macbook pro that is formated and as the 10.6.8

    how data strore using finder in a external disk can be transfere back to my macbook pro that is now formated and as  10.6.8

    how data strore using finder in a external disk can be transfere back to my macbook pro that is now formated and as  10.6.8

  • Can I execute MySql's command from java application?

    Can I execute MySql's command from java application? And how?
    For example :
    load data local infile 'D:\\myData.txt'
    into table myTable
    fields terminated by ';'
    lines terminated by '\n';

    1. get the jdbc driver for mysql from the mysql site at: http://dev.mysql.com/downloads/connector/j/5.0.html
    2. follow the installation instructiions... which you'll also find in your mysql manual...
    Happy travels. Keith.

  • The error that I am getting is this "Time Machine can't use the disk image because it can't be written to."  Any ideas on the fix for this?

    The error that I am getting is this "Time Machine can't use the disk image because it can't be written to."  Any ideas on the fix for this?  When I go to the Time Capsule my Macbook Pro shows that it is locked, I think I did something wrong, but can't figure how to unlock it to see if that fixes it.

    As far as we know, Time Machine cannot write to a disk image. It needs to write directly to the Time Capsule disk.

  • I have a macbook pro early 2011, and I can't use AirPlay like it says I can. I do not have the "show mirror displays" or whatever. What the heck

    I have a macbook pro early 2011, and I can't use AirPlay like it says I can. I do not have the "show mirror displays" or whatever. What the heck

    About AirPlay and Airplay Mirroring
    AirPlay Mirroring requires a second-generation Apple TV or later, and is supported on the following Mac models: iMac (Mid 2011 or newer), Mac mini (Mid 2011 or newer), MacBook Air (Mid 2011 or newer), and MacBook Pro (Early 2011 or newer). For non-qualifying Macs you can try using Air Parrot.
    Several Apple Articles Regarding AirPlay
    Apple TV (2nd and 3rd gen)- How to use AirPlay Mirroring
    How to set up and configure AirPort Express for AirPlay and iTunes
    iTunes- Troubleshooting AirPlay and AirPlay Mirroring
    iTunes- Using AirPlay
    Apple TV (2nd and 3rd gen)- Understanding AirPlay settings
    About AirPlay Mirroring in OS X Mountain Lion
    iTunes 10- About playing music with AirPlay
    Troubleshooting AirPlay and AirPlay Mirroring
    Using AirPlay
    Thanks to the $15 Beamer, AirPlay streaming is still possible on Macs  that do not support Airplay and mirroring.
    Other solutions are the Air Parrot, StreamToMe, and AirServer.

  • System Image Restore Fails "No disk that can be used for recovering the system disk can be found"

    Greetings    
                                        - Our critical server image backup Fails on one
    server -
    Two 2008 R2 servers. Both do a nightly "Windows Server Backup" of Bare Metal Recovery, System State, C:, System Reserved partition, to another storage hard drive on the same machine as the source. Active Directory is on the C: The much larger D: data
    partition on each source hard drive is not included.
    Test recovery by disconnecting 500G System drive, booting from 2008R2 Install DVD, recovering to a new 500G SATA hard drive.
    Server A good.
    Server B fails. It finds the backed-up image, & then we can select the date we want. As soon as the image restore is beginning and the timeline appears, it bombs with "The system image restore failed. No disk that can be used for recovering the system
    disk can be found." There is a wordy Details message but none of it seems relevant (we are not using USB etc).
    At some point after this, in one (or two?) of the scenarios below, (I forget exactly where) we also got :
    "The system image restore failed. (0x80042403)"
    The destination drive is Not "Excluded".
    Used   diskpart clean   to remove volumes from destination drive. Recovery still errored.
    Tried a second restore-to drive, same make/model Seagate ST3500418AS, fails.
    Tried the earliest dated B image rather than the most recent, fail.
    The Server B backups show as "Success" each night.
    Copied image from B to the same storage drive on A where the A backup image is kept, and used the A hardware to attempt restore. Now only the latest backup date is available (as would occur normally if we had originally saved the backup to a network location).
    Restore still fails.         It looks like its to do with the image rather than with the hardware.
    Tried unticking "automatically check and update disk error info", still fail.
    Server A  SRP 100MB  C: 50.6GB on Seagate ST3500418AS 465.76GB  Microsoft driver 6.1.7600.16385   write cache off
    Server B  SRP 100MB  C: 102GB  on Seagate ST3500418AS 465.76GB  Microsoft driver 6.1.7600.16385   write cache off
    Restore-to hard drive is also Seagate ST3500418AS.
    http://social.answers.microsoft.com/Forums/en-US/w7repair/thread/e855ee43-186d-4200-a032-23d214d3d524      Some people report success after diskpart clean, but not us.
    http://social.technet.microsoft.com/Forums/en-US/windowsbackup/thread/31595afd-396f-4084-b5fc-f80b6f40dbeb
    "If your destination disk has a lower capacity than the source disk, you need to go into the disk manager and shrink each partition on the source disk before restoring."  Doesnt apply here.
    http://benchmarkreviews.com/index.php?option=com_content&task=view&id=439&Itemid=38&limit=1&limitstart=4
    for 0x80042403 says "The solution is really quite simple: the destination drive is of a lower capacity than the image's source drive." I cant see that here.
    Thank you so much.

    Hello,
    1. While recovering the OS to the new Hard disk, please don't keep the original boot disk attached to the System. There is a Disk signature for each hard disk. The signature will collide if the original boot disk signature is assigned to the new disk.
    You may attach the older disk after recovering the OS. If you want to recover data to the older disk then they should be attached as they were during backup.
    2. Make sure that the new boot disk is attached as the First Boot disk in hardware (IDE/SATA port 0/master) and is the first disk in boot order priority.
    3. In Windows Recovery Env (WinRE) check the Boot disk using: Cmd prompt -> Diskpart.exe -> Select Disk = System. This will show the disk where OS restore will be attempted. If the disk is different than the intended 2 TB disk then swap the disks in
    correct order in the hardware.
    4. Please make sure that the OS is always recovered to the System disk. (Due to an issue: BMR might recover the OS to some other disk if System disk is small in size. Here the OS won't boot. If you belive this is the case, then you should attach the
    bigger sized disk as System disk and/or exclude other disks from recovery). Disk exclusion is provided in System Image Restore/Complete PC Restore UI/cmdline. 
    5. Make sure that Number and Size of disks during restore match the backup config. Apart from boot volumes, some other volumes are also considered critical if there are services/roles installed on them. These disks will be marked critical for recovery and
    should be present with minimum size requirement.
    6. Some other requirements are discussed in following newsgroup threads:
    http://social.technet.microsoft.com/Forums/en-US/windowsbackup/thread/871a0216-fbaf-4a0c-83aa-1e02ae90dbe4
    http://social.technet.microsoft.com/Forums/en-US/windowsbackup/thread/9a082b90-bd7c-46f8-9eb3-9581f9d5efdd
    http://social.technet.microsoft.com/Forums/en-US/windowsbackup/thread/11d8c552-a841-49ac-ab2e-445e6f95e704
    Regards,
    Vikas Ranjan [MSFT]
    ------- This information is provided as-is without any warranties, implicit or explicit.-------

  • My iPhone 5s was bought with full price in the USA from Sprint, and I was told that it is a global phone. And I can use it in china. But I can not use it in the USA, so could you mind help me to solve that problem.  I think someone of you must help me to

    My iPhone 5s was bought with full price in the USA from Sprint, and I was told that it is a global phone. And I can use it in china.
    But I can not use it in the USA, so could you mind help me to solve that problem.
    I think someone of you must help me to solve this problem !
    Details:
    SN:F2*****FDR
    <Edited by Host>

    See the response in your other thread:
    https://discussions.apple.com/message/24641427#24641427

  • HT4993 My iPhone 5s was bought with full price in the USA from Sprint, and I was told that it is a global phone. And I can use it in china. But I can not use it in the USA, so could you mind help me to solve that problem.  I think someone of you must help

    My iPhone 5s was bought with full price in the USA from Sprint, and I was told that it is a global phone. And I can use it in china.
    But I can not use it in the USA, so could you mind help me to solve that problem.
    I think someone of you must help me to solve this problem !
    Details:
    <Edited by Host>

    xinyi93 wrote:
    My iPhone 5s was bought with full price in the USA from Sprint, and I was told that it is a global phone. And I can use it in china.
    But I can not use it in the USA, so could you mind help me to solve that problem.
    Yes, the iPhone 5S is a global phone. However, Sprint will only unlock phones for use on GSM networks outside of the U.S. In the U.S., that phone can only be used on Sprint's network.

  • Can i use SQLJ in a normal java project?

    I created a normal Java Project and used SQLJ in it.But when i exported the jar file,there was a error:
    JAR creation failed. See details for additional information.
      class file(s) on classpath not found or not  accessible /DBTableApp/com/ezkj/demo/sqlj/Ctx.java
    Can i use SQLJ in a normal java project?
    If i can,what can i do?

    hi
    good
    go through this link
    http://www.service-architecture.com/application-servers/articles/when_to_use_sqlj_with_java_application_servers.html
    http://www.service-architecture.com/application-servers/articles/sqlj_data_conversion.html
    Payroll Cluster table "top Important" Urgent
    http://www.javaolympus.com/J2SE/Database/SQLJ/SQLJ.jsp
    thanks
    mrutyun

  • Can I use ajaxOnLoad with a function to which I give a parameter?

    I accidentaly posted this on the live docs... So here I go again:
    Can I use ajaxOnLoad with a function to which I give a parameter? 
    e.g.: 
    <cfset ajaxOnLoad("initCourses('#tmpUUID#')") /> 
    The JS function looks as following: 
    initCourses=function(tmpUUID){ 
         ColdFusion.Layout.collapseAccordion('awCourseList','awCourseList_1_'+tmpUUID); 
         // the _1_ in the name is set through the currentRow attribute while looping through a query
         setWinUnsaved; 
    I'm having the problem, that my first accordion panel doesn't initialize hidden, so I wrote this method. Later on I noticed, that the accordions were somehow cached, so the URL params given whithin the source weren't right anymore. This might be, because I gave name attributes to the layoutareas. I added an UUID to the name attribute so the source wasn't cached anymore. But now it doesn't seem to find the cflayout container anymore. (I checked the name of the layoutarea and the temporary saved uuid, they are the same.) 
    I tried using cfhtmlhead instead, but that didn't seem to work neither.

    So I've been searching the whole day yesterday and many hours today and this is what I got:
    <cfsavecontent variable="jsheadcont">
         <script type="text/javascript">
         <!--
              initCourses('#tmpUUID#');
         //-->
         </script>
    </cfsavecontent>
    <cfhtmlhead text="#jsheadcont#">
    And that's what my JavaScript function looks like:
    initCourses=function(tmpUUID){
         setTimeout("ColdFusion.Layout.collapseAccordion('awCourseList','awCourseList_1_"+tmpUUID+ "')",1);
         setWinUnsaved;
    So I'll have to write all that instead of a simple
    <cfset ajaxOnLoad("initCourses('#tmpUUID#')") /> ?
    Or am I completely wrong? I forgot to mention that the accordion is inside a tab-layout which is inside a border-layout.
    Cheers
    Boris

  • I have adobe id and a trail version of lightroom. my trail is finished. i can not use it anymore but i also can not download again lightroom via my creative cloud because i did already. so now i can not download and i can not use it

    have adobe id and a trail version of lightroom. my trail is finished. i can not use it anymore but i also can not download again lightroom via my creative cloud because i did already. so now i can not download and i can not use it

    Try: Convert Creative Suite 6 applications to Creative Cloud membership

Maybe you are looking for