Having trouble passing a getter method in a PreparedStatement

Basically I've got it so that the user fills in their name, dob etc and when they click on register it inserts their information in a registrations table. However, I'm having trouble getting this working (NullPointerException) so any help would be greatly appreciated :)
RegisterDetails.java
public void writeToTbl() throws SQLException, ClassNotFoundException {
          DBase d = new DBase();
          GUI g = new GUI();
          i = 0;
          String regStr = "INSERT INTO REGISTRATION VALUES(?,?,?,?,?,?,?,?)";
          PreparedStatement st = d.getConnection().prepareStatement(regStr);          
          st.setInt(1, i);
          st.setString(2, g.getName()); //Exception error points to this line
          st.setString(3, g.getDOB());
          st.setString(4, g.getRoad());
          st.setString(5, g.getCity());
          st.setString(6, g.getCounty());
          st.setString(7, g.getPhone());
          st.setString(8, g.getEmail());
          st.executeUpdate();
     }GUI.java
btnReg.addActionListener(new ActionListener() {
               public void actionPerformed(ActionEvent ev) {               
                    if (ev.getSource() == btnReg && (agree.isSelected())) {
                         writeToFile(f, bWriter);
                         RegisterDetails reg = new RegisterDetails();
                         try {
                              reg.writeToTbl(); //Exception error points to this line
                         } catch (SQLException e) {
                              e.printStackTrace();
                         } catch (ClassNotFoundException e) {
                              e.printStackTrace();
                    else {
// JTextFields return their results
public String getName() {
          return name.getText(); //Exception error points to this line
     public String getDOB() {
          return dob.getText();
     public String getRoad() {
          return road.getText();
     public String getCity() {
          return city.getText();
     public String getCounty() {
          return county.getText();
     public String getPhone() {
          return phoneNo.getText();
     public String getEmail() {
          return email.getText();So essentially I'm trying to get the information from the textfields and insert it into the registrations table but nothing seems to work. I've followed numerous tutorials on how to do it, but all of them use "fixed" values e.g., setString(1, "James") etc but I need the value of the JTextFields as they will be different every time. I'm completely at a loss with this at the moment so any help would be magnificent. :-)
Thank you!

so any help would be magnificent.Write a class that accepts the values that you want to insert. I would suggest passing an ArrayList. It opens the connection, does the insert, closes the statement and the connection.
It does NOT have any GUI code in it.
You then debug that class and verify it works.
THEN, after you have verified it works, you write ANOTHER class that does the gui. It uses the class above to do the database work.

Similar Messages

  • Having trouble passing values between methods

    So if this isnt the right spot for this.
    Anyhow any coments on where I went wrong or need to fix will be apriciated.
    So I got two methods that return a value (getHour() and getMinute(). The values that are returned I am tring to pass into showTime. However it doesn't seem to work as all I get is zero's.
    I've done a search around on the net and Im starting to thing my intellagnce is limited.
    import java.util.Scanner;
    public class First
    static int sH, sM;
        public static void main(String args[]){
            getHour();
            getMinute();
           showTime(sH,sM);
        static int getHour(){
            Scanner input = new Scanner(System.in);
            System.out.println("Please enter the hour: ");
            int setHour = input.nextInt();
            if(setHour <= 24){
                System.out.println("You entered " +setHour+ " for the hour.");
            }else{
                System.out.println("Please enter the hour number from 0 to 24");
                getHour();
         return sH;
         static int getMinute(){
            Scanner input = new Scanner(System.in);
            System.out.println("Please enter the minutes: ");
            int setMinute = input.nextInt();
            if(setMinute <= 60){
                System.out.println("You entered " +setMinute+ " for the minutes.");
            }else{
                System.out.println("Please enter the hour number from 0 to 60");
                getMinute();
            return sM;
        private static void showTime(int sH, int sM){
              System.out.println(+sH+":"+sM);
    }

    Hi,pls compare ur coding with the one i have posted below. In your code, the variables sH and sM are still in initialised state(value =0) and its not assigned with the values returned by getHour and getMinute methods. This is why the shoTime method returned zero. Hope i helped you.
    import java.util.Scanner;
    * @author Jaison KS-IT
    public class First {
    static int sH, sM;
    public static void main(String args[])
    getHour();
    getMinute();
    showTime(sH,sM);
    static int getHour(){
    Scanner input = new Scanner(System.in);
    System.out.println("Please enter the hour: ");
    int setHour = input.nextInt();
    if(setHour <= 24){
    System.out.println("You entered " setHour " for the hour.");
    sH = setHour;
    }else{
    System.out.println("Please enter the hour number from 0 to 24");
    getHour();
    return sH;
    static int getMinute(){
    Scanner input = new Scanner(System.in);
    System.out.println("Please enter the minutes: ");
    int setMinute = input.nextInt();
    if(setMinute <= 60){
    System.out.println("You entered " setMinute " for the minutes.");
    sM = setMinute;
    }else{
    System.out.println("Please enter the hour number from 0 to 60");
    getMinute();
    return sM;
    private static void showTime(int sH, int sM){
              System.out.println(+sH+":"+sM);
    }

  • Hi, ive been having trouble passing my logic sessions to another computer, we're both using a macbook pro 10.6.8 and logic pro 9 with the same plugins, the session opens in the other computer but all the synths reset to presets

    Hi, ive been having trouble passing my logic sessions to another computer, we're both using a macbook pro 10.6.8 and logic pro 9 with the same plugins (native instruments komplete 7), the session opens in the other computer but all the synths reset to presets, this didnt happen the first time I shared a session, but its been happening lately quite often

    kwmlr439 wrote:
    CSOUND Read the title please:
    Re: Macbook Pro 10.6.8 RAM Upgarde to 8 GB
    The amount of RAM is not dependant on the operating system. It is all about the model of you Mac.
    10.6.8 is the version of OS X that is installed on your system. It has no real baring on the amount of RAM that CAN be installed.
    Personally I have never had good luck with Corsair RAM. I have always had good luck with Crucial and Kingston.
    Message was edited by: Shootist007
    Message was edited by: Shootist007

  • I've been having trouble with in getting iMessage to send messages. I decided to connect to my VPN (along with wifi) and it worked. Why won't it work via my wifi connection alone?

    I've been having trouble with in getting iMessage to send messages. I decided to connect to my VPN (along with wifi) and it worked. Why won't it work via my wifi connection alone?

    Using FaceTime http://support.apple.com/kb/ht4319
    Troubleshooting FaceTime http://support.apple.com/kb/TS3367
    The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
    http://tinyurl.com/a7odey8
    Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/TS4268
    iOS: FaceTime is 'Unable to verify email because it is in use'
    http://support.apple.com/kb/TS3510
    Using FaceTime and iMessage behind a firewall
    http://support.apple.com/kb/HT4245
    iOS: About Messages
    http://support.apple.com/kb/HT3529
    Set up iMessage
    http://www.apple.com/ca/ios/messages/
    iOS 6 and OS X Mountain Lion: Link your phone number and Apple ID for use with FaceTime and iMessage
    http://support.apple.com/kb/HT5538
    How to Set Up & Use iMessage on iPhone, iPad, & iPod touch with iOS
    http://osxdaily.com/2011/10/18/set-up-imessage-on-iphone-ipad-ipod-touch-with-io s-5/
    Troubleshooting Messages
    http://support.apple.com/kb/TS2755
    Troubleshooting iMessage Issues: Some Useful Tips You Should Try
    http://www.igeeksblog.com/troubleshooting-imessage-issues/
    Setting Up Multiple iOS Devices for iMessage and Facetime
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
    FaceTime and iMessage not accepting Apple ID password
    http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
    FaceTime, Game Center, Messages: Troubleshooting sign in issues
    http://support.apple.com/kb/TS3970
    Unable to use FaceTime and iMessage with my apple ID
    https://discussions.apple.com/thread/4649373?tstart=90
    How to Block Someone on FaceTime
    http://www.ehow.com/how_10033185_block-someone-facetime.html
    My Facetime Doesn't Ring
    https://discussions.apple.com/message/19087457
    Send an iMessage as a Text Message Instead with a Quick Tap & Hold
    http://osxdaily.com/2012/11/18/send-imessage-as-text-message/
    To send messages to non-Apple devices, check out the TextFree app https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8
    How to Send SMS from iPad
    http://www.iskysoft.com/apple-ipad/send-sms-from-ipad.html
    You can check the status of the FaceTime/iMessage servers at this link.
    http://www.apple.com/support/systemstatus/
     Cheers, Tom

  • Having trouble threading frames, getting the wrong loaded cursor, not the chain-links

    Hi there, I am trying to thread frames, which hasn't been an issue for me previously. The cursor usually shows the chain link icon when hovering over the second frame, but today it is showing a square icon and when I try to click into the the second frame instead, it tries to create a new text frame. Any help is appreciated. Thanks!

    i had put the two text boxes on different layers before to show that they were separate frames, they actually live on one layer together.
    Re: Having trouble threading frames, getting the wrong loaded cursor, not the chain-links 

  • I am having trouble importing photos, gets stuck on the same photo each time?!?

    I am having trouble importing almost 3000 pics from my phone to my computer. Start up disk should be fine, cleaned it up before I began.  Import gets stuck on the same photo each time I try the import.  I have had to force quit a few times, and it can't seem to get past that same picture near the end.  Please help?!? It never gives me an error, it just keeps spinning and nothing is importing.

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    The title of the Console window should be All Messages. If it isn't, select
              SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar at the top of the screen.Click the Clear Display icon in the toolbar. Then take one of the actions that you're having trouble with. Select any messages that appear in the Console window. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    The log contains a vast amount of information, almost all of which is irrelevant to solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    Some private information, such as your name, may appear in the log. Anonymize before posting.

  • I'm having trouble with "this" and method dependence

    For my Data Structures course, we have to create a simple Word Processor. The constructor contains two stacks, left and right. The way the class populates the strings is pretty straight forward. Any text to the left of the cursor gets pushed onto the left stack and any text to the right of the cursor gets pushed onto the right stack (in reverse order). For example, the phrase "hello" with the cursor between the l's, would push h, then e, then l onto the left stack. o then l is pushed onto the right stack. Follow me so far?
    Next, we have to implement several methods, such as moveLeft, moveRight, delete, insert, and moveToStart. There is also a toString() method which prints the two stacks as a String. The way I have my toString() method mapped out, is first to call the moveToStart() method. This method then pops all values from the left stack and pushes them onto the right stack (left: empty, right: h-e-l-l-o). So now, I simply pop each value from the right stack and store the values in a char[] array. The array is then returned as a String.
    This data structure converts the stacks to a String fine, the only problem is preserving the original stacks. So I tried to copy the value of "this," which should correlate to the EditableString es2 (declared in main), to a temp EditableString, tempEs. I then call moveToStart on tempEs, and pop values from tempEs.right. This is all in hopes to preserve the original es2. However, as you could see from the output at the bottom is that toString() modifies es2. If it didn't, "Hello, how are you" would have printed twice. Instead, an empty string is printed.
    There is obviously something wrong with my moveToStart(). Any suggestions? I apologize for not providing any comments in the code, it's just that I tried to save space. If any further explanation is necessary, don't hesitate to ask. Thanks.
    public class EditableString {
    private Stack left;
    private Stack right;
    private JavaStack l = new JavaStack();
    private JavaStack r = new JavaStack();
    private char[] text;
    private static String cursor = new String("|");
    private EditableString tempEs;
    private Character characterObject;
    private char test1;
    public EditableString() {
    left = new JavaStack();
    right = new JavaStack();
    public EditableString(String left, String right) {
    new EditableString();
    for (int i=0; i < left.length(); i++) {
    characterObject = new Character(left.charAt(i));
    l.push(characterObject);
    for (int i = right.length(); i > 0; i--) {
    characterObject = new Character(right.charAt(i-1));
    r.push(characterObject);
    this.left = l;
    this.right = r;
    public void moveToStart() {
    while (! this.left.isEmpty())
    this.right.push(this.left.pop());
    public String toString() {
    tempEs = this;
    tempEs.moveToStart();
    text = new char[(tempEs.right).size()];
    for (int i=0; i < text.length; i++)
    text[i] = ((Character) (tempEs.right).pop()).charValue();
    return new String(text);
    public static void main(String args[]) {
    System.out.println("Starting Word processor!");
    System.out.println("----------");
    EditableString es2 = new EditableString("Hello, how", " are you");
    System.out.println("es2: " + es2.toString());
    System.out.println("es2: " + es2.toString());
    /* Output:
    Starting Word processor!
    es2: Hello, how are you
    es2:
    */

    Ok, I tried to create a copy(Es) method and modified the toString() method as follows, but I am having the same problem. Ok, in order to test my methods, I print the various sizes of several stacks. In the toString() method, right after tempEs is declared, this.left=10, this.right=8 and tempEs.left=tempEs.right=0. After the copy method is invoked and assigned to tempEs, this.left=tempEs.left=10 and this.right=tempEs.right=8. Follow me?, this is where I have trouble.
    I try to "pop" one value from tempEs.right to see if the action occurs on tempEs and not this. Well, it does. Right after the pop() method, this.left=tempEs.left=10 and this.right=tempEs.right=7. I need this.right to stay at 8. Why are these Editable Strings dependent?
    And for the record, I'm not trying to "pay" anyone to do my homework. I am simply trying to pass, and in turn, graduate. This is the second time I am taking this course (failed it with style the 1st time) and desperately need to pass. I have VERY little Java background and this class is unfortunately required for my engineering degree. So, I am simply looking for some help with my 30+hour homework assignments.
    public EditableString copy(EditableString ES) {
            EditableString xTemp = new EditableString();
            xTemp.left = ES.left;
            xTemp.right = ES.right;
            return xTemp;
        public String toString() {
            EditableString tempEs = new EditableString();
            tempEs = copy(this);
            tempEs.right.pop();
            tempEs.moveToStart();
            text = new char[(tempEs.right).size()];
            for (int i=0; i < text.length; i++)
                text[i] = ((Character) (tempEs.right).pop()).charValue();
            return new String(text);

  • Having trouble passing form values to a data action in 10G

    I have a view object that queries the hr.departments table. In the app module, I created a custom method to bind a paramter to the query. I am able to make this work only if I manually enter a value for the paramsNames[0] value for the dataaction. When I run it with say the value of 1700, it returns the correct data (I run this by right-click and run on the dataaction that binds the valule).
    What I want to do now is have a form on a jsp that looks like the following:
    &lt;html:form action="bindDeptLoc.do"&gt;
    &lt;input type="text" name="locationid"/&gt;
    &lt;input type="submit" value="Submit"/&gt;
    &lt;/html:form&gt;
    .. pass the "locationid" value to the bindDeptLoc dataction for the binding. I noticed that J-Dev automatically created a default form bean called DataForm. I tried to add a form-property with the name of the form field (locationid), but that didn't work. I then tried to create another form bean called login and added the locationid form property to it and associated the form bean with the dataaction).
    When I run this I get the following error:
    javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection
         at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:798)
         at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506)
         at untitled1.jspService(untitled1.jsp:13)
         [untitled1.jsp]
    It won't even load up the jsp form. Any help on this?

    In the paramsNames[0] node instead of your fixed value use param.locationid which is the indicator to use the value from that field in the JSP.

  • Having trouble accessing class get function

    Hi;
    I am writing a flash AIR application.
    I have a document class attached to a FLA to put elements on the stage, It Then instantiates and puts myClass1 an the stage. MyClass1 puts more elements on the stage, and sets the value of a variable _myValue. MyClass1 also has a public getter function which returns _myValue.
    The document class then instantiates MyClass2, which is passed a reference to MyClass1. MyClass2 needs to access _myValue in MyClass1.
    The following code structure throws an error. While not the exact code, the code below should show haw it was implemented. I have condensed the code to make it understandable.
    If you want to see the whole code I'll try.
    DocumentClass.as
    package ui {
              import flash.display.Sprite;
              public class DocumentClass extends Sprite {
                        public function DocumentClass() {
                                  var  myClass1:MyClass1 = new MyClass1();
                                  addChild(myClass1);
                                  var myClass2:MyClass2 = new MyClass2(myClass1);
                                  addChild(myClass2);
    MyClass1.as
    package ui {
              import flash.display.sprite;
              public class MyClass1 extends Sprite {
                        private var _myValue:int;
                        public function MyClass1() {
                                  //some code to add stuff to the stage.............................
                                  _myValue = 10;
                        public function get myValue():int {
                                  return _myValue;
    MyClass2.as
    package ui {
              import flash.display.Sprite;
              public class MyClass2 extends Sprite {
                        public function MyClass2(referenceMyClass1:Sprite) {
                                  var ref:Sprite = referenceMyClass1;
                                  var myValue:int = ref.myValue();
    This gives me an error
    MyClass2.as, Line 39 1061: Call to a possibly undefined method myValue through a reference with static type flash.display:Sprite.

    Thanks for your responce. That was one of the problems.
    As it turns out another problem was:
    public function MyClass2(referenceMyClass1:Sprite)
    should have bee
    public function MyClass2(referenceMyClass1:MyClass1)

  • Having trouble with the renameTo() method in Windows

    Hi all,
    The below code works perfectly well in netbeans but as shown as I try to call it from cmd prompt I get issues.
    The below code is designed to move or delete log files from one area or another.
    now if i try to delete the logs from command prompt I have no problem.
    However when I tried to move the files by doing renameTo() I get a false back. And as this method seems to have no relevant error message, I am at a loss....
    Now I have checked the permissions, this is not a problem (all users can edit the files, if I can't edit them why will let me delete them?), I have checked to make sure no duplicate files exist and they don't. i have also tried to move the files to different locations, same problem. The files are definitely not open.
    I need the below to work on 1.5 due to compatibility issues with other programs.
    Any ideas?
    public class Main {
         * @param args the command line arguments
         * args[0] = Directory where files are to be processed from
         * args[1] = file extension to process
         * args[2] = Number of days to limit on. IE 31 means all files older than 31 days
         * args[3] = location of log file
         * args[4] = del/move. if del, files are deleted. if move, files are moved.
         * args[5] = Location of the new file. only applicable if file is moved.
        public static final String newLine = System.getProperty("line.separator").toString();
        public static void main(String[] args) {
            try {
                File file = new File(args[0]);
                FileNameFilter fileFilter = new FileNameFilter(args[1]);
                int days = Integer.parseInt(args[2]);
                File[] children = file.listFiles(fileFilter);
                // longs required because int overflow limit reached.
                long daysAgoPart1 = 1000 * 60 * 60;
                long daysAgoPart2 = 24 * days;
                long daysAgoPart3 = daysAgoPart1 * daysAgoPart2;
                long daysAgo = new Date().getTime() - (daysAgoPart3);
                // System.out.println(daysAgoPart3);
                // System.out.println(new Date().getTime());
                // System.out.println(daysAgo);
                // System.out.println(new Date().toString());
                Date limitDate = new Date(daysAgo);
                // System.out.println(new Date(new Date().getTime()).toString());
                //  System.out.println(limitDate.toString());
                for (int i = 0; i < children.length; i++) {
                    if (children.lastModified() - limitDate.getTime() < 0) {
    if (args[4].compareTo("del") == 0) {
    printLog("Deleted file: " + children[i].getAbsolutePath(), args[3]);
    children[i].delete();
    } else if (args[4].compareTo("move") == 0){
    String fileName = children[i].getAbsolutePath();
    if (!children[i].canRead()){
    printLog("Can't read: " + fileName, args[3]);
    } else if (!children[i].canWrite()){
    printLog("Can't write: " + fileName, args[3]);
    if( (children[i].renameTo(new File(args[5] + children[i].getName())))){
    printLog("Moved file "+ fileName, args[3]);
    } else {
    printLog("Failed to move file "+ fileName, args[3]);
    } catch (Exception err) {
    printLog(err.toString(), args[3]);
    public static void printLog(String message, String logLoc) {
    try {
    File errLog = new File(logLoc);
    FileWriter errFW = new FileWriter(errLog, true);
    errFW.append(new Date().toString() + " " + message);
    errFW.append(newLine);
    errFW.close();
    } catch (IOException errFWException) {
    }Edited by: enema0007 on Sep 2, 2009 8:27 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    right I think I have worked out what I am doing wrong I think.....
    I am calling the code with:
    java -jar "deleteLogs.jar" "D:\TADDM" ".rar" 31 "D:\Working Files\deleteFilesLog.log" "move" "D:\Working Files\"
    However when I go to create file its giving me:
    D:\Working Files"logs.rar
    Which is clearly not the correct file name....
    So why is it removing the \ and not the "?

  • Still having trouble passing variables

    So, I read some on the MVC as my problem in my previous post
    was trying to pass variables between classes in the same package.
    I've got three classes, ListLoader, SectionPanel and TagWidget...
    MVC respectively. Or at least I think I've set them up that way.
    ListLoader is responsible for querying the db via PHP when
    TagWidget asks it to and then supplies a string variable. I'm
    trying to get TagWidget to pass that variable to the
    viewer/SectionPanel to display in a textfield but can't seem to get
    ListLoader to reflect that. Now, the problem is in how I've
    formatted ListLoader, I believe so I'll only show that class and
    just know that TagWidget is calling the variable using
    "trace(loadFTPList.fulllist);" where loadFTPList is the instance
    name of ListLoader. What am I doing wrong?
    Here is my class in question:

    You want to dispatch the event after fulllist is ready.
    If you do this:
    this.dispatchEvent(event.clone());
    fulllist = record;
    the event is dispatch before fulllist can be properly read,
    so your listener
    (whatever that may be) will find and empty/null/undefined
    list.
    but if you do this:
    fulllist = record;
    this.dispatchEvent(event.clone());
    then in your listener
    myListLoader.addEventListener(Event.COMPLETE, myListHandler);
    function myListHandler(evt:Event){
    if(evt.type == Event.COMPLETE)
    // the list is ready
    trace(ListLoader(event.target).fulllist);

  • I am having trouble trying to get my address book from my mac (just downloaded Lion for this purpose) to my 3G ipad. Set up an icloud account but still confused! Please help !

    I updated my mac with  os x Lion so that I could accomplish moving my address book from the mac to my new IPad 3G. I also set up an icloud account for this purpose, but I *still* cannot figure out how to move my address book from one computer to the other. When I'm on my mac and try to use bluetooth to export the address book, I'm able to find my ipad but I soon get a message that it does not support the necessary services. I have no idea what's going on and would appreciate any advice. tks in advance, Sarah

    blacksheepfibers wrote:
    I updated my mac with  os x Lion so that I could accomplish moving my address book from the mac to my new IPad 3G. I also set up an icloud account for this purpose, but I *still* cannot figure out how to move my address book from one computer to the other. When I'm on my mac and try to use bluetooth to export the address book, I'm able to find my ipad but I soon get a message that it does not support the necessary services. I have no idea what's going on and would appreciate any advice. tks in advance, Sarah
    The address book syncs via iCloud, not Bluetooth or iTunes.
    You upgraded to Lion so you could use iCoud.
    On the computer. go to Apple menu > System prefs > iCloud.
    Sign into your iCloud account.
    Tick everything.
    This enalbes the se items syncing to iCloud.
    On the iPad, Settings > Mail, Contacts, Calendars.
    Create a new iCloud account.
    Sign in with the same AppleID as your computer.
    Settings > iCloud and turn everything on.
    BAM!
    That is all you need to do.
    Your contacts (and all other checked items checked) will sync between computer and iPad.
    No need to use iTunes

  • Having troubles passing values of Shuttle control to SQL Query of Report and Chart Region

    Hello,
    I am very new to APEX and need help for one of the Pa.I have a shuttle control on my page which populates Categories. Once user selects Categories from this control, I wish to pass the values to following SQL query :
    select * from emp_class where category IN ( LIST of VALUES FROM RIGHT SIDE SHUTTLE).
    I tried various ways of doing this including writing a java scripts which reads shuttle value, converts it into below string
    'Category1',Category2',Category3'. Then I set this value to a text box. And then I was expecting that below trcik would work
    select * from emp_class where category IN (:TXT_VALUES)
    I am sure this is not right way and hence its not working. Can you please guide me here with options?
    Many Thanks,
    Tush

    b96402b4-56f7-44ba-8952-fb82a61eeb2c wrote:
    Please update your forum profile with a real handle instead of "b96402b4-56f7-44ba-8952-fb82a61eeb2c".
    I am very new to APEX and need help for one of the Pa.
    Don't understand what this means. What is "Pa"?
    select * from emp_class where category IN (:TXT_VALUES)
    I am sure this is not right way and hence its not working. Can you please guide me here with options?
    This is a common fallacy. In
    select * from table where columnvalue in (7788, 7839, 7876)
    (7788, 7839, 7876) is an expression list and the predicate is evaluated as a membership condition.
    In
    select * from table where columnvalue in :P1_X
    :P1_X is a scalar string, incapable of containing multiple values.
    In an APEX standard report, a PL/SQL function body returning an SQL query report source with lexical substitution can be used to produce a "varying IN-list":
    return 'select * from table where columnvalue in (' || :P1_X || ')';
    where P1_X contains fewer than 1000 values, has been sanitized for SQL injection, and string values are properly quoted.
    Some people suggest the following approach, which will also work in APEX interactive reports:
    select * from table where instr(':' || :P1_X || ':', ':' || columnvalue || ':') > 0
    However this is non-performant as it eliminates the possibility of the optimizer using indexes or partition pruning in the execution plan.
    See varying elements in IN list on Ask Tom, and emulating string-to-table functionality using sql for efficient solutions.

  • I'm having trouble with my payment method payment type it's not accepting any of my cards

    Payment method/payment type will not accept any of my cards for payment it's saying my security codes are wrong there are available funds on both card

    You have exactly the same name and address on your iTunes account that the cards are registered to : http://support.apple.com/kb/TS1646 ?
    And when you say that there are available funds on the cards, do you mean that they are debit cards ? If they are then I don't think that they are still accepted as a valid payment method in all countries - from this page :
    You may be able to use other payment types in your country, like debit and Maestro cards
    which implies that they are not accepted in all countries, and there have been a number of posts about them being declined.

  • Trying to create and excel graph and having trouble finding properties and methods for active x.

    I am trying to use Active X in labview 7 to create an excel graph and the HasMajorGridlines property for charts is not in my menu. Where can I get this property and others that appear to be missing and what is a good resource (looking for anything, especially books) for for using activeX/Labview/excel together?

    I am not sure if there is a book or tutorial how to use excel with LabView. I ncluded a Vi which gives you access to the HasMajorGridlines property. I hope it gives you the clou how to work with excel obejcts...
    Chris
    Attachments:
    excel_example.vi ‏24 KB

Maybe you are looking for