Requesting help with using "doc.newPage" ...

Hi,
I am using Acrobat Professional 8.1.2 and I would like to add a blank page to an open document. Is there anything wrong with the following Javascript code:
// Insert Blank Page
app.addMenuItem({ cName: "Insert Blank Page", cParent: "Tools", cExec: "BlankPage()"});
function BlankPage()
doc.newPage();
Once it has been invoked, I receive the message:
An Internal error ocurred.
Thanks in advance for your help.
-Greg

The newPage document method needs to be in a trusted function. Also, the doc object as you've currently coded it will be undefined. Your cExec code should be:
cExec: "BlankPage(this);"
and the function could look something like:
var BlankPage = app.trustedFunction(function (doc) {
    app.beginPriv();
    doc.newPage();
    app.endPriv();
assuming this code is placed in a folder-level JavaScript file. This isn't necessarily the best way to code this, so I'd suggest reading up on trusted functions and trust propagator functions in the Acrobat JavaScript reference for more information.
George

Similar Messages

  • Help with using multiple hard drives

    Is there a way to install the OS on an "external" (expresscard SSD) drive, but have all of the library and data files on the primary hard disk? I LOVE the speed on my SSD, but it's a pain finding stuff now. Is this something a RAID configuration could help with?

    mwmmartin wrote:
    I have a 1 TB hard drive; but I have a 500GB and 250GB usb external hard drives.
    Wouldn't it be cool if I could make the two external hard drives a RAID drive and use Time Machine to use all the 750GB of external memory to do my backups???
    You can, but I would +*strongly recommend against+* it. See +Concatenated RAID+ in the Help for Disk Utility.
    There are several potential problems:
    Depending on how much data is on your 1 TB drive, 750 GB may not be enough to back it up. See #1 in Time Machine - Frequently Asked Questions (or use the link in *User Tips* at the top of this forum).
    To set up a +Concatenated RAID+ set, both drives will be erased.
    When (not if) either drive fails, you'll lose all the data on both.
    Both drives must be connected any time you do a backup or want to browse your backups.
    Especially with USB, if one drive wakes from sleep, or spins up, quickly enough, but the other one doesn't, the backup may fail and/or your backups may be corrupted.
    For now, it looks like my only solution is to go buy a bigger external hard drive and spend more money,,,
    That's your best solution +*by far.+* Anything else is taking a large risk with your backups.

  • Request Help With Oracle BI Apps 7.9.x development license

    Request some one from Oracle to PLEASE help with the following query or help me to move the post to right forum.
    I have downloaded BI Apps 7.9 to load it on top of BI EE. These are received from Development Downloads under OTN site (not eDelivery). Both these are planned as development install on one machine with sufficient specs on Windows 32 bit platform.
    BI EE is loaded and starts successfully. Then switched of the services and started to load BI Apps CD1. Done it successfully. Next while starting to install Informatica PowerCenter 7.1.4 it asks product license key. Please help to know where to get this key? Also please help with any connectivity and options key, as well as those for any other products, related to this objective.
    Many thanks,

    Hi RAJC,
    Many thanks for the suggestion. I have moved past that aspect now with this help. Have also verified that everything is working well with BI server, presentation services, scheduler server etc. Admin tool works fine.
    But have difficulty connecting DAC client to the database. The login window does not bring up option to select suitable driver for connecting to Oracle Database 10.2.0.x Also, wonder what table owner name and pw will work here? are they the same as those for schema owner? that is sh.rpd etc? The BI apps version is 7.9 and BIEE is 10.1.3.3
    Thanks

  • Need help with using Solaris FLAR across disparate platforms

    All,
    I need help with what needs to be done to use solaris Flash for disaster recovery between the disparate Server platforms listed below.
    I am concerned about the platform specific files that would be missing?
    Note: All our servers are installed with the SUNWCprog cluster through Custom jumpstart and We use disksuite for mirroring the operating system drives.
    Primary Server     Recovery Server
    Sun Fire 6800     Sun Fire E2900
    Sun Fire E2900     Sun Fire 6800
    Sun Fire-880     Sun Fire-V440
    Sun Fire-V440     Sun Fire-880
    Sun Fire 4800     Sun Fire-880
    Sun Fire-V890     Sun Fire 4800          
    Me

    jds2n,
    Is it possible to get around installing the Entire Distribution + OEM and include only the platform specific files?
    Just a thought
    Example:
    I would like to create a Flash Archive of a E2900 server which i plan to use to recover a 6900.
    The 2900 was installed with a developer cluster.
    When creating the Flash archive of the 2900 is it possible to add the 6900 platform specific files and drivers
    from the Solaris CD?
    Thanks

  • Need help with using Email Activation Agent

    Hi,
    please, help me with using E-mail Activation Agent.
    I used email activation agent to start business processes by email, but after that letter disappear from email-server.
    Where letter was located?
    Can I get and read letter for processing?

    Mail/Preferences/General - do you have Unibox set as your default e-mail application?

  • Help with using a web page from disk after saved from web

    Hi, I almost forgot the little I learned about web page development, so, I'm a total noob when it comes to this and I need your help.
    I saved as a complete web page on my hard disk this web page but when I open it in Firefox or IE, it doesn't display as much as I need it. I'm mostly interested  in displaying the logo images as they appear on the original web page. The browsers just show them briefly when refreshing but hide them right away. I can see the image files downloaded to my hard drive and if I open the page in Dreamweaver it displays these images  in the preview pane but I can't make them show in the browsers. From Dreamweaver I saved the page as in the folder where the images are and this also updated the code with the relative image links but the browsers still don't show them.
    I will greatly appreciate your help with this.

    I'm sorry, but your post is very confusing
    I saved as a complete web page on my hard disk this web page
    Does this include site definitions?
    when I open it in Firefox or IE, it doesn't display as much as I need it.
    I dont know what this means...are there images that are not being displayed?  Is there styling that is not being rendered?
    . I'm mostly interested  in displaying the logo images as they appear on the original web page. The browsers just show them briefly when refreshing but hide them right away.
    Again, I dont know what this means?
    I can see the image files downloaded to my hard drive and if I open the page in Dreamweaver it displays these images  in the preview pane but I can't make them show in the browsers. From Dreamweaver I saved the page as in the folder where the images are and this also updated the code with the relative image links but the browsers still don't show them.I will greatly appreciate your help with this.
    Do you have a link to the page, and perhaps some explanation that is more clear as to what your issue is.
    Gary

  • Urgent Request: Help With Websheet Issues

    Hello.
    This is an urgent request for help. I am currently developing a websheet demo and have run into several puzzling issues.
    I am using APEX 4.0.1. My organization will upgrade to 4.0.2 in several months.
    Issue 1:
    I am trying to create a file annotation to be associated with several rows in a data grid I created. When I browse to the .xls file to be uploaded and then click "Apply", a stripped wait bar appears indicating that the file is being uploaded. Or so I thought. Instead, that stripped bar sits there FOREVER. After 30 minutes waiting for a very simple two-row .xls file (first row is the column headers followed by a row of data - simple integers), I finally clicked the "Cancel" button. The file was not uploaded.
    I have repeated this several times, and even closed/re-opened my browser. Same results. Even tried a simple .txt file. Still no good.
    I am running IE 8.x I even tried the same thing in FireFox 3.6.1. Same behavior.
    Issue 2:
    I also created a Note annotation. After entering some simple text (about 10 words) and clicking the "Apply" button, the page displays the following error:
    Sun, 2 Jan 2011 22:18:44 GMT wwv_flow.show: SIGNATURE (parameter names) MISMATCH VARIABLES IN FORM NOT IN PROCEDURE: F21,F22,F23,F24,F25,F26,F27,F28,F29,F30,F31,F32,F33,F34,F35,F36,F37,F38,F39,F40,F41,F42,F43,F44,F45,F46,F47,F48,F49,F50,F51,F52,F53 NON-DEFAULT VARIABLES IN PROCEDURE NOT IN FORM:
    I then click the previous breadcrumb link which take me back to my data grid I then click the pencil "Edit" icon for the row for which this Note is associated and, to my surprise, the Note with my entered text is there. APEX did, in fact, create it. However, not without displaying this error message which I'm sure would be rather intimidating to our end users trying to do this. this same behavior occurs when trying to modify an already existing Note. I receive the same message. However, the modifications were enacted.
    As with Issue 1, this same behavior is seen with FireFox as well.
    Issue 3:
    After saving my Data Grid as an "Alternative Default Report", I see the Note annotation I created associated with the report row. However, when I hover my mouse on the Note icon, all that displays is the first 4 words or so, about 15 characters, followed by a 3-dot ellipsis. The remaining 10+ characaters are hidden. What good is that?
    Is there aimit to the number of characaters that can be placed in a Note Annotation? I have not seen this characater limit mentioned anywhere in the online APEX docs. I realize that I probably would not want a PhD disseration placed in a Note, but just 30 or so characaters? That seems awfully skimmpy.
    As before, I'm seeing this same strange behavior in FireFox 3.6.1 as with IE 8.x
    Issue 4:
    When editing text in a Section, I attempt to re-size the text with a larger font size (say, from 10 to 14). I click the "Apply" button, but the resulting text stays the same size. I am unable to re-size the font in a section.
    Even more puzzling is that the OBE "Building a Websheet In APEX 4.0" example application (http://st-curriculum.oracle.com/obe/db/apex/r40/websheets/websheets_ll.htm) which takes me step-by-step in creating a websheet app shows that one can do all of the things mentioned in the above three issues. So, then, how is this tutorial able to do all these things but I am not?
    Are these issues fixed in the 4.0.2 patch? I checked the online list of bug fixes for this patch and, although several do relate to websheets, none address the above three issues.
    As mentioned, I am trying to prepare for this websheet demo and would really appreciate some quick advice or suggestions.
    Thank you in advance.
    Elie
    Edited by: EEG on Jan 2, 2011 3:31 PM

    Hi, Christina.
    Thanks very much for the info about why we are seeing multiple APEX$ tables sprinkled amongst multiple schemas. I've passed this info to our APEX administrator.
    Also, thanks for confirming what I suspected was a bug in the rich text editor. Hopefully this will be addressed soon.
    I do understand your comment about not being able to stylize the Title text. Still, I am wondering why I do NOT see the HTML code in my own environment here at work. Yet on apex.oracle.com I see the code. This is why I made the comment in my last post. Seeing this code where there shouldn't be any code surprised me. So, why is this code not showing up for me here?
    With respect to my file upload issue, as mentioned in my original post, I am NOT able to upload a quite simple .xls file as a file annotation to be associated with a row in a data grid I had created. However, I AM able to upload this exact same .xls file to a section on a page without problem.
    In my websheet app on apex.oracle.com, navigate to Data -> Data Grids, click on the data grid "MAD Data Upload", select the report "2. Symbols Report with Annotations", click the pencil icon next to (I believe) the 2nd row which currentl displays a link, a note, and several tags. Then attempt to upload a simple .xls Excel file. The one I tried has 2 rows, a header row with 5 column headers, and a 2nd row with integer values for those 5 columns. That's it. After browsing to my file and clicking the "Apply" button, I get a stripped progress bar that sits there FOREVER. After about 10 minutes I gave up waiting. I figured that, even over the web, a simple two row Excel file should have been uploaded after ten minutes. My connection is pretty fast. I get no errors. Also there is no file.
    One more thing ... Remember my Issue 2 in which I was attempting to modify a previously created Note annotation and received a weird error (see my original post above)? Well, I attempted to do this on apex.oracle.com.
    In the same Data Grid row that you navigated to above, scroll to the very bottom and you will see my single Note Annotation. I attempted to modify this. I clicked the "Edit" link, typed in my changes, and clicked "Apply". This time, instead of receiving that weird error message, I received a more intelligent (though still weird) error message:
    Not Found
    Sorry!The page requested was not found.
    And, just as with the truly weird message I would consistently receive in my own environment here at work, the text changes I had made to the Note were, in fact, preserved because when I re-look at my Note Annotation in the Data Grid, the Note does show the changes I had made.
    Needless to emphasize, these errors would likely freak out end users who are adding Note Annotations to a Data Grid they had created. After all, these are the intended audience of a websheet app not a developer like me who is used to seeing such weird messages.
    Would you know what all this about?
    Thanks again for all your patience and sticking with me on this.
    Elie

  • Help with using mergesort to sort a list of names alphabetically?

    Hi, I'm trying to sort a list of names alphabetically, case-insensitive by using the mergesort technique.
    I wrote this code and when I trace it through on paper with an example array of names, it should work, but when I run it with an actual txt file, it's not correctly alphabetical.
    I'd appreciate it if someone could take a look at my code and give me some ideas on what my problem might be.
    Thanks in advance! (note: I also posted this question to java-forums.org, as I've been working on this little problem for over five hours and am in desperate need of some help!)
    public static void mergeSort(String[] names) 
            if (names.length >= 2) 
                String[] left = new String[names.length/2]; 
                String[] right = new String[names.length-names.length/2]; 
                for (int i = 0; i < left.length; i++) 
                    left[i] = names;
    for (int i = 0; i < right.length; i++)
    right[i] = names[i + names.length/2];
    mergeSort(left);
    mergeSort(right);
    merge(names, left, right);
    // pre : result is empty; list1 is sorted; list2 is sorted
    // post: result contains result of merging sorted lists;
    // add merge method below
    public static void merge(String[] names, String[] left, String[] right)
    int i1 = 0;
    int i2 = 0;
    for (int i = 0; i < names.length; i++)
    if (i2 >= right.length || (i1 < left.length && left[i1].compareToIgnoreCase(right[i1])<0))
    names[i] = left[i1];
    i1++;
    } else
    names[i] = right[i2];
    i2++;

    Welcome to the forum.
    Please read this to learn hot to format your code (and other things relevant for this forum):
    https://forums.oracle.com/forums/ann.jspa?annID=1535
    923566 wrote:
    Hi, I'm trying to sort a list of names alphabetically, case-insensitive by using the mergesort technique.
    I wrote this codeDo you know the <tt>TreeSet</tt> class?
    http://docs.oracle.com/javase/7/docs/api/java/util/TreeSet.html
    With that sorting Strings is a two liner:
    http://www.java2s.com/Code/Java/Collections-Data-Structure/TreeSetDemo.htm
    bye
    TPD

  • Can anyone help with using My Book World with Mac Book?

    I've finally got my macbook to see the MyBookWorld in the finder (after many many "connect to the server" attempts) but I still can't figure it out-
    1- I can't access the Public or Download folders, I get "Unexpected error code -8059".
    2- I can't drag my music, movies or pictures onto it.
    3- Time Machine does not see the MyBookWorld as a device to back up to.
    4- How do I access my MyBookWorld through the web interface? Do I need to do or change something in there and that would fix everything? I feel like there is just one piece of the puzzle I'm missing to get it all set up right....
    Any advice/help would be greatly appreciated!!!

    veganburger wrote:
    3- Time Machine does not see the MyBookWorld as a device to back up to.
    Time Machine doesn't work well, if at all, with most NAS devices. See the pink box in #2 of [Time Machine - Frequently Asked Questions|http://web.me.com/pondini/Time_Machine/FAQ.html] (or use the link in *User Tips* at the top of the +Time Machine+ forum).
    WD claims it will work: http://wdc.com/wdproducts/updates/docs/en/appletimemachine.pdf
    but there are a number of posts, mostly in the +Time Machine+ forums, by folks having problems. Support is difficult, because WD isn't expert in Time Machine's workings, and Apple isn't expert in WD's workings.

  • Help with Using Adobe Reader with iBook G4

    I have downloaded Adobe Reader 7.0.8 several times in order to read eBooks on my G4 12"iBook using OS 10.4.7. I activated the Adobe program as directed but continue to get an error message when attempting to use the application. The message indicates that...
    Could not create an EDB database: Unable to load the specified database dynamic link library.
    I've sent Adobe Reader 7.0.8 to the trash and reinstalled the program from the Adobe site several times thinking that something is missing from the download; I still get the error message. Amazingly I did the same process on my iMac G5 desktop and everything works fine; the book shows up! I've posted the problem on Adobe forums for Reader but no help came back.

    some info from Adobe site:
    http://support.adobe.com/devsup/devsup.nsf/docs/54170.htm
    also found this suggestion on Adobe forum:
    "Under Adobe Reader 7.05, the edb1drv file is in the following directory: macos/selfhealfiles/CFMSupport/Library/CFMSupport/edb1drv
    Exit from Adobe Reader 7.05. Locate the file and move that file to the /Library/CFMSupport/ folder. Then restart Adobe Reader 7.05. Adobe Reader 7.05 will be able to read the edb1drv file and stop the error message."

  • Help with using Scanner Class

    Hi there - I'm a newbie to Java and may have posted this in the wrong forum previously.
    I am trying to modify a program so instead of using a BufferReader, a scanner class will be used. It is basically a program to read in a name and then display the variable in a line of text.
    Being new to Java and a weak programmer, I am getting in a mess with this and missing something somewhere. I don't think I'm using scanner in the correct way.
    Any help or pointers would be good. There are 2 programs of code being used. 'Sample' and 'Run Sample'
    Thanks in advance.
    Firstly, this program will run named 'Sample'
    <code>
    * Sample.java
    * Class description and usage here.
    * Created on 15 October 2006
    package internetics;
    * @author John
    * @version 1.2
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    // import com.ralph.*;
    public class Sample extends JFrame
    implements java.awt.event.ActionListener{
    private JButton jButton1; // this button is for pressing
    private JLabel jLabel1;
    private String name;
    /** Creates new object ChooseFile */
    public Sample() {
    initComponents();
    name = "";
    selectInput();
    public Sample(String name) {
    this();
    this.name = name;
    private void initComponents() {
    Color bright = Color.red;
    jButton1 = new JButton();
    jLabel1= new JLabel();
    addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent evt) {
    exitForm(evt);
    getContentPane().setLayout(new java.awt.GridLayout(2, 1));
    jButton1.setBackground(Color.white);
    jButton1.setFont(new Font("Verdana", 1, 12));
    jButton1.setForeground(bright);
    jButton1.setText("Click Me!");
    jButton1.addActionListener(this);
    jLabel1.setFont(new Font("Verdana", 1, 18));
    jLabel1.setText("05975575");
    jLabel1.setOpaque(true);
    getContentPane().add(jButton1);
    getContentPane().add(jLabel1);
    pack();
    public void actionPerformed(ActionEvent evt) {
    System.out.print("Talk to me " name " : ");
    try {
    jLabel1.setText(input.readLine());
    } catch (IOException ioe) {
    jLabel1.setText("Ow! You pushed my button");
    System.err.println("IO Error: " + ioe);
    /** Exit this Application */
    private void exitForm(WindowEvent evt) {
    System.exit(0);
    /** Initialise and Scan input Stream */
    private void selectInput() {
    input = new Scanner(new InputStreamReader(System.in));
    /**int i = sc.nextInt(); */
    /** Getter for name prompt */
    public String getName() {
    return name;
    /** Setter for name prompt */
    public void setName(String name) {
    this.name = name;
    * @param args the command line arguments
    public static void main(String args[]) {
    new Sample("John").show();
    </code>
    and this is the second program called 'RunSample will run.
    <code>
    class RunSample {
    public static void main(String args[]) {
    new internetics.Sample("John").show();
    </code>

    The compiler I'm using is showing errors in these areas of the code. I've read the tutorials and still can't get it. They syntax for the scanner must be in the wrong format??
    the input.readLine appears incorrect below.
      public void actionPerformed(ActionEvent evt) {
        System.out.print("Talk to me " +name+ " : ");
        try {
            jLabel1.setText(input.readLine());
        } catch (IOException ioe) {
          jLabel1.setText("Ow! You pushed my button");
          System.err.println("IO Error: " + ioe);
        }and also here...
    the input is showing errors
      /** Initialise and Scan input Stream */
      private void selectInput() {
        input = new Scanner(new InputStreamReader(System.in));
       /**int i = sc.nextInt(); */
      }Thanks

  • Help with using itunes with 4s library after i upgraded to iPhone 5 and computer power supply went

    long story hopefully an easy fix....
    on wensday my power supply went and had to ship computer across country to Puget Computer Systems as we weren't sure if it was power supply or mobo...luckily it was power supply.
    i daily backed up iphone 4s with itunes (10.7) as i do all music manually, playlists, etc. have like 3,000 plus songs, videos, audiobooks, mail aaccts and about 48 apps.
    so next day (sept 19th) apple comes out with iOS 6 which i update my 4s to with no problem. I wanted a day to play with it to learn my way around.
    next day i wait in line for 8 hours overnite and was #2 in line at apple store for my ATT 32gb white iPhone 5. while at apple store I get my icloud backup which gets all paid music,apps, etc since itunes version 10.3 (i always did both backups so as not to lose my contacts more than anything.
    I have other paid stuff that is in library on computer along with audiobooks and about 2700 more songs.
    my icloud backup put the playlists on iPhone but not most of the music for them as lots were ripped from my cd's.as i double them up making a copy on iPhone and a copy on itunes.
    So I have been using iPhone 5 with no problems just don't have all of itunes library on it. My computer is coming back this week how do I plug in iPhone 5 via USB (which will be seen as new phone even though it has same name) and use my existing iTunes 10.7 library which the backups in iTunes still has iOS 5.1.1 on it?
    There must be an easy way of doing it as i don't want to wipe off iphone 5 again as i don't see any purpose my library is all organized perfectly. I know my way around windows 7 pro 64 bit pretty well just don't know what itunes is going to say once it sees "joe's iPhone" again and installs the usb drivers and icon for it. what will it ask in regards to library and how do i use it with previous iOS on it?
    Thank you very much for the help as I am going to need it.
    yes i broke the cardinal rule of cross posting and apoligize  for it just amazed i couldn't find answer via google nor any apple store genius knew it either.

    Hi All,
    Any help?
    No one has any answers here amoungst all this apple knowledge?
    Thank you

  • Need help with using graphics in swing components

    Hi. I'm new to Java and trying to learn it while also developing an application for class this semester. I've been following online tutorials for about 2 months now, though, and so I'm not sure my question counts as a "new to Java" question any more as the code is quite long.
    Here is the basic problem. I started coding the application as a basic awt Applet (starting at "Hello World") and about a month in realized that Swing components offer better buttons, panels, layouts, etc. So I converted the application, called BsfAp, to a new JApplet and started adding JPanels and JComponents with layout managers. My problem is, none of the buffered graphics run in any kind of JPanel, only the buttons do. I assume the buffered graphics are written straight to the JApplet top level container instead but I'm not entirely sure.
    So as to not inundate the forum with code, the JApplet runs online at:
    http://mason.gmu.edu/~dho2/files/sensor.html
    The source code is also online at:
    http://mason.gmu.edu/~dho2/files/BsfAp.java
    What I would like to do is this - take everything in the GUI left of the tabbed button pane and put it into a JScrollPane so that I can use a larger grid size with map display I can scroll around. The grid size I would like to use is more like 700x1000 pixels, but I only want to display about 400x400 pixels of it at a time in the JScrollPane. Then I could also move this JScrollPane around with layout manager. I think this is possible, but I don't know how to do it.
    I'm sure the code is not organized or optimized appropriately to those of you who use Java every day, but again I'm trying to learn it. ;-)
    Thanks for any help or insight you could provide in this.
    Matt

    Couple of recs:
    * Don't override paint and paint directly on the JApplet. Paint on a JPanel and override paintComponent.
    * The simplest way to display a graphic is to put an image into an ImageIcon and show this in a JLabel. This can then easily go inside of the JScrollPane.
    * You can also create a graphics JPanel that overrides the paintComponent, draw the image in that and show that inside of the JScrollPane.
    * don't call paint() directly. Call repaint if you want the graphic to repaint.
    Here's a trivial example quickly put together:
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.FlowLayout;
    import java.awt.GradientPaint;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.Paint;
    import java.awt.RenderingHints;
    import java.awt.geom.Ellipse2D;
    import java.lang.reflect.InvocationTargetException;
    import javax.swing.JApplet;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.SwingUtilities;
    public class BsfCrap extends JApplet
        private JPanel mainPanel = new JPanel();
        private JScrollPane scrollPane;
        private JPanel graphicsPanel = new JPanel()
            @Override
            protected void paintComponent(Graphics g)
                super.paintComponent(g);
                Graphics2D g2d = (Graphics2D)g;
                RenderingHints rh = new RenderingHints(
                    RenderingHints.KEY_ANTIALIASING,
                    RenderingHints.VALUE_ANTIALIAS_ON);
                g2d.setRenderingHints(rh);
                Paint gPaint = new GradientPaint(0, 0, Color.blue,
                    40, 40, Color.magenta, true);
                g2d.setPaint(gPaint);
                g2d.fill(new Ellipse2D.Double(0, 0, 800, 800));
        public BsfCrap()
            mainPanel.setPreferredSize(new Dimension(400, 400));
            mainPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
            graphicsPanel.setPreferredSize(new Dimension(800, 800));
            graphicsPanel.setBackground(Color.white);
            scrollPane = new JScrollPane(graphicsPanel);
            scrollPane.setPreferredSize(new Dimension(300, 300));
            mainPanel.add(scrollPane);
        public JPanel getMainPanel()
            return mainPanel;
        @Override
        public void init()
            try
                SwingUtilities.invokeAndWait(new Runnable()
                    public void run()
                        setSize(new Dimension(400, 400));
                        getContentPane().add(new BsfCrap().getMainPanel());
            catch (InterruptedException e)
                e.printStackTrace();
            catch (InvocationTargetException e)
                e.printStackTrace();
    }

  • Looking for some help with using Oracle stored procedures in vb2010

    First off thank you to whoever lends me a hand with my problem. A little background first I am in a software development class and we are currently building our program using VB (I have no experience in this), and Oracle(currently in a Oracle class so I know how to use Oracle itself just not with VB).
    I am using vb2010 express edition if that helps. Currently I have a stored procedure that takes a 4char "ID" that returns a position (ie, salesperson,manager ect). I want to use the position returned to determine what vb form is displayed (this is acting as a login as you dont want a salesperson accessing the accountants page for payroll ect).
    Here is the code I have currently on the login page of my VB form
    Imports Oracle.DataAccess.Client
    Imports Oracle.DataAccess.Types
    Public Class Login
    Dim conn As New OracleConnection
    Private Sub empID_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles empID.Click
    End Sub
    Private Sub LoginBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoginBtn.Click
    conn.ConnectionString = "User ID = Auto" & _
    ";Password = ********" & _
    ";Data Source = XE"
    conn.Open()
    Dim sq1 As String = "Return_Position" 'name of procedure
    Dim cmd As New OracleCommand(sq1, conn)
    cmd.CommandType = CommandType.StoredProcedure
    cmd.Parameters.Add(New OracleParameter("I_EmpID", OracleDbType.Char, 4)).Value = Emp_ID.Text
    Dim dataReader As OracleDataReader = cmd.ExecuteReader
    dataReader.Read()
    Dim position As New ListBox
    position.Items.Add(dataReader.GetString(0)) 'were I am getting an error, I also tried using the dataReader.getstring(0) to store its value in a string but its a no go
    If position.FindStringExact("MANAGER") = "MANAGER" Then
    Me.Hide()
    Dim CallMenu As New Menu()
    CallMenu.ShowDialog()
    End If
    LoginBtn.Enabled = False
    End Sub
    I have read the oracle.net developer guide for using oracle in vb2010 and have successfully gotten through the document however they never use a stored procedure, since the teacher wants this program to user a layered architecture I cannot directly store sql queries like the document does, thus the reason I want to use stored procedures.
    This is getting frustrating getting stuck with this having no background in VB, I could easily do this in c++ using file i/o even through it would be a pain in the rear....

    Hello,
    I am calling Oracle 11g stored procedures from VB.Net 2010. Here is a code sample (based on your code) you should be able to successfully implement in your application.
    Please note that you may have to modify your stored procedure to include an OUT parameter (the employee position) if it doesn't have it yet.
    Private Sub LoginBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoginBtn.Click
    Dim sProcedureName As String = "Return_Position" 'name of stored procedure
    Dim ORConn as OracleConnection, sConn as String
    Dim sPosition as String, sDataSource as String, sSchema as String, sPWD as String
    Dim cmd As OracleCommand
    'please provide below sDataSource, sSchema and sPWD in order to connect to your Oracle DB
    sConn = "Data Source=" & sDataSource & ";User Id=" & sSchema & ";Password=" & sPWD & ";"
    ORConn = New OracleConnection(sConn)
    ORConn.Open()
    cmd = New OracleCommand(sProcedureName, ORConn)
    With cmd
    .CommandType = Data.CommandType.StoredProcedure
    'input parameter in your stored procedure is EmpId
    .Parameters.Add("EmpID", OracleDbType.Varchar2).Value = Emp_ID.Text
    .Parameters.Item("EmpID").Direction = ParameterDirection.Input
    'output parameter in your stored procedure is Emp_Position
    .Parameters.Add("Emp_Position", OracleDbType.Varchar2).Direction = ParameterDirection.Output
    .Parameters.Item("Emp_Position").Size = 50 'max number of characters for employee position
    Try
    .ExecuteNonQuery()
    Catch ex As Exception
    MsgBox(ex.Message)
    Exit sub
    End Try
    End With
    sPosition = cmd.Parameters.Item("Emp_Position").Value.ToString
    'close Oracle command
    If Not Cmd Is Nothing Then Cmd.Dispose()
    Cmd = Nothing
    'close Oracle connection
    If Not ORConn Is Nothing Then
    If not ORConn.State = 0 Then
    ORConn.Close()
    End If
    ORConn.Dispose()
    End If
    ORConn = Nothing
    If UCase(sPosition) = "MANAGER" Then
    Me.Hide()
    Dim CallMenu As New Menu()
    CallMenu.ShowDialog()
    End If
    LoginBtn.Enabled = False
    End Sub
    If you need further assistance with the code, please let me know.
    Regards,
    M. R.

  • Request help with upgrading 10gr2 to 11gr2(11.2.03) in EBS 11.5.10.2

    EBS 11.5.10.2
    Sue Linux 10 SP2
    HRMS application
    Database 10.2.0.4
    I am planning on upgrading 10gr2 to 11gr2(11.2.03) in EBS 11.5.10.2.
    I was going thru document 881505.1 under Veryfy software versions, it says autoconfig latest version with 9835302 patch.
    In note 165195.1 using autoconfig to manage Configurations with oracle systems under patching autoconfig, says apply patch 9525311.
    which one should be applying?
    9835302 patch or 9525311?
    Thanks.

    I was going thru document 881505.1 under Veryfy software versions, it says autoconfig latest version with 9835302 patch.
    In note 165195.1 using autoconfig to manage Configurations with oracle systems under patching autoconfig, says apply patch 9525311.
    which one should be applying?
    9835302 patch or 9525311?
    The doc says "Also apply patch 9835302" in addition to AutoConfig patches, so you need to apply both -- (Patch 9835302 and Patch 9535311).
    Thanks,
    Hussein

Maybe you are looking for

  • Question regarding xsd and shredding

    All, I have the following xsd and xml file, I register the xsd in xmldb and create a resource from the xml file. Upon registration of the xsd, the proper (I think) tables are created and upon creating the resource the primary table seems to have a ro

  • Help I,m a dad trying to sort out my daughters ipod shuffle

    Just bought new ipod shuffle on web, was working fine but now it seems to be frozen. I have tried all the suggestions on the web site and still the stupid little thing won't work. When I turn it on a green light stays on for about 3 seconds then flic

  • What DVD External Drive do I need

    Hello I want to upgrade my vs. 10.2.28 to 10.4 but I only have a CD drive. Can someone send me a link for a brand/model or tell me exactly what type of external DVD firmware drive I need to get so that I can install 10.4 on my system. Thank you!

  • Itunes 7.1 download

    hello when i go onto the itunes website under download. i cant download itunes 7.1 the box where the download it supposed to be have the page cannot be displayed in it. iv tried refreshing the page and opening it up again but its not working. anyone

  • Error in EJB JNDI Binding for EMP Bean

    Hi friends, I need to call a ejb from second ejb ( entity bean from a sission bean). I have defined all xml mapping in ejb.xml.jar and server specific jar file (jboss.xml.jar). I am using boss-4.0.5.GA. But when I am calling that session bean from si