2 Replies Latest reply: Oct 18, 2011 7:40 AM by JSET2 RSS

    Oracle lite Java Command to drop a device

    JSET2
      I want to know if there is a java method to drop a device from the Oracle lite repository. I don't find it in the java doc. If such method does not exist maybe I could delete the Device in the repository tables? Is someone did that before?

      Thank you
      Simon
        • 1. Re: Oracle lite Java Command to drop a device
          vasileios
          is that what you need?

          http://download.oracle.com/docs/cd/E12095_01/doc.10303/e12090/oracledb.htm#BCGGBGGC
          3.1 Deleting a Client Device

          If you want to delete a device, use the delete method from the Device class. To retrieve the Device object, use either the getDevice or getDeviceByName methods, as demonstrated below.

          If the device id is available, the following can be directly used:

          if (oracle.lite.resource.ResourceManager.getInstance() == null)
          oracle.lite.resource.ResourceManager.initialize(JDBC_URL, USER, PASSWORD);

          oracle.lite.resource.Device d =
          oracle.lite.resource.ResourceManager.getInstance().getDevice(deviceId);

          d.delete();

          If the device id is not available, then you can provide the device name, which is shown on the Mobile Manager UI in the oracle.lite.resource.User.getDeviceByName(deviceName) method. Once retrieved, use the delete method of the Device object as demonstrated above.
          • 2. Re: Oracle lite Java Command to drop a device
            JSET2
            Hi, thank you for your answer. That's exactly what i'm looking for. I don't know why I did not saw it when i searched in the Java Doc.