Help with test case compilation error

I keep getting this error cant figure out why??
Warning: compiled but with compilation errors
Errors for PACKAGE BODY FF1_PKG
LINE/COL ERROR
*11/28 PLS-00386: type mismatch found at 'FF1_TB_OUT' between FETCH curs*
or and INTO variables
*11/1 PL/SQL: SQL Statement ignored*
--desc user_cons_columns
drop type ff1_tb;
drop type ff1_typ;
create or replace type ff1_typ as object( tb varchar2(30),col varchar2(4000));
create or replace type ff1_tb as table of ff1_typ;
desc user_cons_columns
create or replace package ff1_pkg is
function ff1 (rownumx number) return ff1_tb;
maxrow number default 10000;
cursor c1(p_rownum number) is select table_name,column_name from user_cons_columns where rownum < p_rownum;
end ff1_pkg;
show errors;
CREATE OR REPLACE PACKAGE BODY ff1_pkg IS
function ff1(rownumx number) return ff1_tb is
ff1_tb_out ff1_tb;
begin
open c1(rownumx);
loop
fetch c1 bulk collect into ff1_tb_out limit maxrow;
exit when c1%notfound;
end loop;
return ff1_tb_out;
end;
end ff1_pkg;
show errors;

but it works when do a using cast(multiset())?? why??
--desc user_cons_columns
drop type ff1_tb;
drop type ff1_typ;
create or replace type ff1_typ as object( tb varchar2(30),col varchar2(4000));
create or replace type ff1_tb as table of ff1_typ;
desc user_cons_columns
create or replace package ff1_pkg is
function ff1 (rownumx number) return ff1_tb;
maxrow number default 10000;
cursor c1(p_rownum number) is select table_name,column_name from user_cons_columns where rownum < p_rownum;
end ff1_pkg;
show errors;
CREATE OR REPLACE PACKAGE BODY ff1_pkg IS
function ff1(rownumx number) return ff1_tb is
ff1_tb_out ff1_tb;
begin
select cast( multiset(select table_name,column_name from user_cons_columns where rownum < rownumx  ) as ff1_tb)  into ff1_tb_out from dual;
open c1(rownumx);
loop
fetch c1 bulk collect into ff1_tb_out limit maxrow;
exit when c1%notfound;
end loop;
return ff1_tb_out;
end ff1;
end ff1_pkg;
show errors;

Similar Messages

  • Help with test case

    Hi,
    I'm trying to produce a test case for a subtle problem, but can't get a
    simple one to work :-(
    I think I'm doing something wrong:
    Source:
    package kodo;
    import java.io.InputStream;
    import java.util.ArrayList;
    import java.util.Collection;
    import java.util.Properties;
    import javax.jdo.JDOHelper;
    import javax.jdo.PersistenceManager;
    import javax.jdo.PersistenceManagerFactory;
    import junit.framework.TestCase;
    public class KodoTest1 extends TestCase
    * @param id
    public KodoTest1(String id)
    super(id);
    public void test1() throws Exception
    PersistenceManagerFactory pmf = getFactory();
    PersistenceManager pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();
    A a = new A();
    a._b = new ArrayList();
    pm.makePersistent(a);
    Object aId = JDOHelper.getObjectId(a);
    B b = new B();
    b._parent = a;
    a._b.add(b);
    pm.currentTransaction().commit(); // looks good after this -- _b is
    a ProxyLinkedList
    pm.close();
    pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();
    A aClone = (A) pm.getObjectById(aId, false);
    assertNotNull(aClone);
    Collection c = aClone._b;
    assertNotNull(c); // fails
    assertEquals(1,aClone._b.size());
    pm.currentTransaction().commit();
    private static PersistenceManagerFactory getFactory() throws Exception
    InputStream propStream =
    KodoTest1.class.getResourceAsStream("/kodo-local.properties");
    Properties props = new Properties();
    props.load(propStream);
    return JDOHelper.getPersistenceManagerFactory(props);
    package.jdo:
    <?xml version="1.0"?>
    <jdo>
    <package name="kodo">
    <class name="B"/>
    <class name="A">
    <field name="_b">
    <collection element-type="B"/>
    <extension vendor-name="kodo" key="inverse" value="_parent"/>
    </field>
    </class>
    </package>
    </jdo>
    kodo-local.properties:
    javax.jdo.option.RetainValues: true
    javax.jdo.option.RestoreValues: true
    javax.jdo.option.Optimistic: true
    javax.jdo.option.NontransactionalWrite: false
    javax.jdo.option.NontransactionalRead: true
    javax.jdo.option.Multithreaded: true
    javax.jdo.option.MsWait: 5000
    javax.jdo.option.MinPool: 1
    javax.jdo.option.MaxPool: 80
    javax.jdo.option.IgnoreCache: false
    javax.jdo.option.ConnectionUserName: tomd
    javax.jdo.option.ConnectionURL: jdbc:oracle:thin:@holygrail:1521:db1
    javax.jdo.option.ConnectionPassword: password
    javax.jdo.option.ConnectionDriverName: oracle.jdbc.OracleDriver
    javax.jdo.PersistenceManagerFactoryClass:
    com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory
    com.solarmetric.kodo.impl.jdbc.WarnOnPersistentTypeFailure: true
    com.solarmetric.kodo.impl.jdbc.SequenceFactoryClass:
    com.solarmetric.kodo.impl.jdbc.schema.DBSequenceFactory
    com.solarmetric.kodo.impl.jdbc.FlatInheritanceMapping: true
    com.solarmetric.kodo.impl.jdbc.AutoReturnTimeout: 10
    #com.solarmetric.kodo.Logger:
    #stdout
    # (Kodo 2.4 license key)
    com.solarmetric.kodo.LicenseKey: xxxxxxxxxxxxxxxxxxxxxxx
    com.solarmetric.kodo.EnableQueryExtensions: false
    com.solarmetric.kodo.DefaultFetchThreshold: -1
    com.solarmetric.kodo.impl.jdbc.DictionaryProperties:NameTruncationVersion=1
    com.solarmetric.kodo.impl.jdbc.UseBatchedStatements=false
    com.solarmetric.kodo.impl.jdbc.StatementCacheMaxSize=1

    You should not be directly accessing fields of PersistenceCapable
    instances or should enhance as Persistence aware:
    e.g. jdoc kodo.KodoTest1.
    However, I strongly recommend against this. It is bad object oriented
    design to be exposing internal variables so (wrap at the least in a
    get method). And in JDO, can easily cause strange behavior if not
    handled correctly as you see in your test case.
    Btw, I would recommend against packaging in kodo as we may be moving
    towards simplifying our package structures into kodo prefixed packages.
    On Wed, 18 Jun 2003 20:11:45 +1000, Tom Davies wrote:
    Hi,
    I'm trying to produce a test case for a subtle problem, but can't get a
    simple one to work :-(
    I think I'm doing something wrong:
    Source:
    package kodo;
    import java.io.InputStream;
    import java.util.ArrayList;
    import java.util.Collection;
    import java.util.Properties;
    import javax.jdo.JDOHelper;
    import javax.jdo.PersistenceManager;
    import javax.jdo.PersistenceManagerFactory;
    import junit.framework.TestCase;
    public class KodoTest1 extends TestCase {
    * @param id
    public KodoTest1(String id)
    super(id);
    public void test1() throws Exception
    PersistenceManagerFactory pmf = getFactory(); PersistenceManager pm =
    pmf.getPersistenceManager(); pm.currentTransaction().begin();
    A a = new A();
    a._b = new ArrayList();
    pm.makePersistent(a);
    Object aId = JDOHelper.getObjectId(a); B b = new B();
    b._parent = a;
    a._b.add(b);
    pm.currentTransaction().commit(); // looks good after this -- _b is
    a ProxyLinkedList
    pm.close();
    pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();
    A aClone = (A) pm.getObjectById(aId, false); assertNotNull(aClone);
    Collection c = aClone._b;
    assertNotNull(c); // fails
    assertEquals(1,aClone._b.size());
    pm.currentTransaction().commit();
    private static PersistenceManagerFactory getFactory() throws Exception
    InputStream propStream =
    KodoTest1.class.getResourceAsStream("/kodo-local.properties");
    Properties props = new Properties();
    props.load(propStream);
    return JDOHelper.getPersistenceManagerFactory(props);
    package.jdo:
    <?xml version="1.0"?>
    <jdo>
    <package name="kodo">
    <class name="B"/>
    <class name="A">
    <field name="_b">
    <collection element-type="B"/>
    <extension vendor-name="kodo" key="inverse" value="_parent"/>
    </field>
    </class>
    </package>
    </jdo>
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com

  • Help with "Testing Failed" Error message in iWeb09

    I bought the iLife 09 upgrade purely so I could publish to my own domain server. I have a MobileMe account and iWeb09 publishes fine there--no problems.
    My domain name is hosted on a Windows NT server. The admin is willing to help, but I was hoping someone could point me to documentation for this error:
    "Testing Failed.
    Unable to write to server. Verify your settings and try again."
    If I ftp to the site in a terminal window and do a put, I can write to the site. Obviously, I could at some point, because it servers the "dummy" page I put up, but I tested again in case my permissions had changed.
    I looked at the "Publishing to Windows-based FTP Server" but it does not seem to describe this error.
    BTW, I pay AppleCare for support, but when I tried to get support documentation from them, the tech said they "can't help" with this part of iWeb and hung up on me--the call lasted exactly 90 seconds.
    I am hoping someone out here will know where the errors are documented or will be able to help me figure it out.

    I waded through the posts for iWeb09 and came across a recommendation for Cyberduck (www.cyberduck.ch), so I tried a copy. Works like a champ. Unlike iWeb09, all I had to do was type in my server name, user name, and password to open the connection. Then I published my site to a folder in iWeb and uploaded the folder in Cyberduck. Cyberduck had no problem writing to the server.
    I still would love to know why iWeb can't write to my web server.

  • Need help with testing a package with Junit

    Hi guys,
    I am currently testing a bunch of files under a particular package. I have compiled all the files in this package successfully. I have written a testcase file which is in the folder above the package folder. I am using Junit to test this. I am getting errors stating that Java cannot find the package.
    To explain in detail.....My package name is coinbox which contain some classes which need to be tested. These files are in the folder "coinbox". My testcase file is in the folder which is directly above this folder. My testcase file has the statement import coinbox.* which will import all the classes in the coinbox package;
    But I am getting an error stating that the package coinbox cannot be found. I tried adding the package path to the CLASSPATH variable but still it isnt working.
    The command am using to run the Junit test cases is as follows:
    javac -cp junit.jar;junit.samples.CoinBoxTest-d CoinBoxTest.java
    Any help or suggestions regarding will be appreciated. The coinbox package is not being detected by java.
    Thanks in advance.
    Edited by: calvin_nr on Sep 30, 2007 5:12 PM

    It smells like a classpath problem. Post a sample of the code you are testing, the package statement in particular and the directory structure where the .class files are.

  • Help with a CASE statement

    Please help me with a CASE Statement:
    - When ID = 15, 16, 17, 18 then "Bad"
    - when ID = 19, then "Average"
    - when ID = 21, then "Good"
    - else "Null"
    Thank you!!

    Well the 1st thing to do would be to correct my poor spelling... change    Delault : to Default :
    Don't know why you would get an error stating "The result of selection formula must be a boolean". It's working fine on my machine.
    If your ID field is numbers stored text you have a couple different options...
    1) Convert the ID to a number...
    Select  ToNumber({home.noone_ID})
    2) Wrap the ID values in double quotes...
       Case "15", "16", "17", "18" :
          "BAD"
    Even if this were your problem... the error should be something other than the boolean thing...
    Jason

  • Help figureing out an compile error.

    I'm working on some code that reads a paper and makes it so you can search for a set of letters or words. For example you could search for the word 'no' and it would find not only when 'no' is used but when 'know' is used. However I'm having trouble getting what I think might work to compile. It gives me:
    Homework1.java:30: cannot find symbol
    symbol : method length()
    location: class char[]
    if (current==test[tke] && tke!=test.length())
    ^
    Homework1.java:36: cannot find symbol
    symbol : method length()
    location: class char[]
    if (tke==test.length())
    ^
    2 errors
    I just need to figure out how to fix these errors. Knowing me this probably won't work if I fix these errors but still. Here is my code:
    import java.util.*;
       import java.io.*;
       import java.text.*;
       import java.lang.*;
        public class Homework1
           public static void main(String[] args)
             String line;
             char current;
             char[] test={'i','n','g'};
             int num=0;
             try
                Scanner Reader = new Scanner(new File("assignment1Test1.txt"));
                while     (Reader.hasNext())
                   line=Reader.nextLine();
                   for (int ch=0; ch<line.length(); ch++)
                      current=line.charAt(ch);
                      int tke=0;
                      if (current==test[tke] && tke!= test.length())
                         tke=tke+1;
                      else
                         if (tke==test.length())
                            num=num+1;
                         tke=0;
                 catch (FileNotFoundException e)
                   System.out.println("I/O Error");
                 catch (NoSuchElementException e)
                   System.out.println("I/O Error");
       }P.S. If you feel like helping me out more than just helping me fix these two errors feel free.

    length is a property of an array not a method.
    So test.length etc.

  • Please help with cannot find symbol error. Been struggling all day :(

    Hi all. :)
    Writing a game for my phone with KToolbar and have been getting a cannot find symbol error for every variable and method I try to use across Classes. I've looked all over and though it seems a common problem I always either don't understand or can't get working the various solutions. Example of my errors:
    C:\...\BTK800i.java:197: cannot find symbol
    symbol : variable youSayWhat
    location: class HelloCanvas
              youSayWhat=key;
              ^
    If I try BTK800i.variable or BTK800i.message I get a new error.
    C:\...\src\BTK800i.java:184: non-static method newOrdersSarge() cannot be referenced from a static context
              BTK800i.newOrdersSarge();
              ^
    Both these errors apply to both variables and methods. It only happens when I'm using methods/variables of one class in another, am I using public and private incorrectly? It doesn't seem to make a difference if I make variables public or leave them private, I'm trying to get to them with a public method within a private class. Is it something else? I really have no idea. :(
    Here's my code, it's long enough to be a tiresome read so I've tried to skip what I know isn't relevant.
    public class BTK800i extends MIDlet {
         private Display myDisplay;
         private HelloCanvas myCanvas;
         public int youSayWhat;
            //a whole bunch more skipped here, but I'm fairly certain it's not anything that'll help find a solution
         public BTK800i() {
              paused=false;
    public void startApp() throws MIDletStateChangeException {
              if( paused ) {
                   myCanvas.repaint();
              else {
                   myDisplay=Display.getDisplay(this);
                   myCanvas=new HelloCanvas();
                   myDisplay.setCurrent(myCanvas);
                   myCanvas.setFullScreenMode(true);
                   youSayWhat=0;
                           //again with the skipping, more code not related
    public void newOrdersSarge() {
    //whole bunch of code
    //other methods skipped
    class HelloCanvas extends Canvas {
         public void keyPressed (int key) {
              youSayWhat=key;
              repaint ();
    //skippage
    }The stuff I skipped is mainly either more of the same sorta thing or maths/writing to screen stuff.
    Thanks alot to anyone who helps. I'm really struggling with this. :(
    Dan.

    But I have been reading them :(
    My next-door neighbour unfortunately is an 80-something married man, but I will go have a looksie about static and instances.
    I thought the point of public variables was that other classes could use them, is this wrong?
    Also does this mean that to use the variables from my BTK class in the HelloCanvas class I need to first instantiate BTK? I don't understand how that works as the code starts running from the BTK class in the first place :S I guess more reading will help with this.
    Thanks very much for replying. :)
    Edit:
    OK I have read up on it but I don't think I found anything I hadn't read before. I tried to make a new class which I could instantiate to hold all the variables and methods I wanted everything to be able to access, but that went disastrously. Am I right in understanding that there are no global variables in Java? :s
    Edited by: Dan69 on Apr 17, 2010 1:15 PM

  • Need help with upper case

    I'm stuck on my coding when I have to write a function to
    detect upper cases has been used in a sentence
    For example if my array element has this:
    2345
    SAINT PAUL
    STREET
    APT 5
    PHILADELPHIA
    I need to be able to write a code to let me know that the 2nd
    OR 3rd OR 5th element is written in upper case letter
    Or if I set the variable not as array, 2345 SAINT PAUL STREET
    APT 5 PHILADELPHIA
    I need to be able to detect that at least one of the section
    on that street name is written with upper case
    Can anyone help please?

    compare() cf function performs a case-sensitive comparison of
    2 strings
    and returns 0 is the strings are the same. so you can compare
    an
    uppercase version of the string to the original string, and
    if the
    comparison returns 0 then your string is in uppercase:
    <cfif compare(ucase(myarray[2]), myarray[2]) is 0>
    <!--- the string in myarray[2] IS in uppercase --->
    <cfelse>
    <!--- it is NOT in uppercase --->
    </cfif>
    the above code compares the value of the second array element
    converted
    to uppercase to the original value of the second array
    element. if the
    result is 0, i.e. the uppercase and original strings are the
    same, then
    you know the original string is in uppercase.
    if you are dealing with a single string (which is equivalent
    to a
    space-delimited list), then use appropriate list function to
    get
    required list element, i.e. listfirst(), listlast(),
    listgetat()...
    <cfif compare(ucase(listlast(mylist, " ")),
    listlast(mylist, " ")) is 0>
    <!--- the last element in the list IS in uppercase --->
    <cfelse>
    <!--- it is NOT in uppercase --->
    </cfif>
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/

  • I need help with Mavericks Server: an error occurred while configuring your server.  I

    I need help with Mavricks Server, I get the following: an error occurred while configuring your server.  I have deleted the Server.app several times along with the associated com.apple and Server folder.  Any more help would be appreciated.

    There are usually some log files around, related to the installation.  See if Console.app (Applications > Utilities) shows anything relevant to the error, when you've done a fresh install of Server.app and tried the configuration.

  • Help with multiple case statements

    Hello,
    I am new to BO.  I am on XI 3.0.  SQL 2005.  In Designer, I am trying to create a measure in a financial universe that would end up being multiple case statements within one select.  This is what I tried to do, but it doesn't work with the two case statements.  Can I use an ELSE leading into the second CASE WHEN somehow?  How can I accomplish this?  Sorry for my ignorance!
    CASE WHEN dbo.ClientBudgetYear.DateStage1Approved > 01/01/1900 AND dbo.ClientBudgetMonth.Month = 12 THEN dbo.ClientBudgetMonth.Stage1Sales END
    CASE WHEN  dbo.ClientBudgetYear.DateStage1Approved > 01/01/1900 AND dbo.ClientBudgetMonth.Month = 11 THEN dbo.ClientBudgetMonth.Stage1Sales END
    Any Suggestions?
    Thanks,
    Holly

    Holly,
    I don't know enough about your data or requirement to provide a solution, however, the construct that you post will not work because it causes you to build an object with multiple case statements when only one case statement per object is permitted.  From what I see in your code I would be inclined to combine the two statements into one as such:
    CASE WHEN dbo.ClientBudgetYear.DateStage1Approved > 01/01/1900 AND dbo.ClientBudgetMonth.Month in (11,12) THEN dbo.ClientBudgetMonth.Stage1Sales else null END
    Thanks,
    John

  • Need help with coding: getting an error

    Hi there everyone, this would be my first post here, and my first post on any forum related to programming. Im taking a highschool computer science course, in which we are learning J2SE. I have read ahead a bit, and am having trouble with the following program:
    //=============================================================================
    //Converts US Dollars To Euros
    //=============================================================================
    public class currencyconverter1
         private Double dollarRate = 1.00000;
         private Double conversionRate = 1.22990;
         private Double dollarAmount = 0.0;
         private Double euroAmount = 0.0;
              public static void main convert Double(euroAmount)
                   dollarAmount = euroAmount*conversionRate;
                   System.out.println(dollarAmount);
                   return euroAmount
                   }JCreator is telling me I need a '(' on the "main" line. I simply cannot find where this is needed. Can anyone help, or recommend another forum where I may find some help? Thanks in advance!

    Thanks for the reply... I tested out your code, and it didn't compile, so after playing with it, heres what I got to compile (please read past the code):
    public class currencyconverter1
         private Double dollarRate = 1.00000;
         private Double conversionRate = 1.22990;
         private Double dollarAmount = 0.0;
         private Double euroAmount = 0.0;
         public Double convert (Double euroAmount)
              dollarAmount = euroAmount * conversionRate;
              System.out.println(dollarAmount);
              return euroAmount;
    }It gives me the following message when I execute the .exe: "Exception in thread "main" Java.Lang.NoSuchMethodError: Main" ....
    Does anyone know what the deal is and can explain wnat my source code error is? Thanks again in advance.

  • Please help! A simple compiler error

    Hi,
    I'm quite new to Java.
    I'm using Sun ONE Studio 4, community edition on Win 2000.
    The following error:
    Test.java [7:1] cannot resolve symbol
    symbol : method forName (java.lang.String)
    location: class Class
    Class.forName("com.mysql.jdbc.Driver");
    _____^
    occurs while compiling the following simple program:
    import java.sql.*;
    public class Test
    public static void main(String[] args)
    Class.forName("com.mysql.jdbc.Driver");
    Connection con = DriverManager.getConnection("jdbc:mysql://Localhost:3306/Loan","Me","Mypassword");
    Could someone please tell me why this happens ?
    I guess the problem is not with the driver since the "Test driver"
    option provided by GUI Editing options results OK. Is the complier
    not configured OK ?
    I've worked with the problem some time now (quite frustrating),
    so I really hope there is someone who can help me.
    Rgds,
    Chris

    static{
              try{
                  Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
                  System.out.println("Ok driver");
              }catch(Exception e){
                System.out.println("driver is not ok : "+e.getMessage());
        }

  • Please help with fixing run time error - what is wrong ?

    Hi
    I am new with JDBC.
    I have compiled a program and am not getting any compile erors, however when trying to run it, am getting errors:
    Advanced Java : Test 1
    Programmer: C.C. Steyn
    Date: 15 July, 2008
    Filename: MakeDB.java
    Purpose: To build an initial database for the ClientNameTaxNrs application
    import java.sql.*;
    import java.io.*;
    public class MakeDB
    public static void main(String[] args) throws Exception
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String url = "jdbc:odbc:ClientNameTaxNrs";
    Connection con = DriverManager.getConnection(url);
    Statement stmt = con.createStatement();
    // The following code deletes each index and table, if they exist.
    // If they do not exist, a message is displayed and execution continues.
    System.out.println("Dropping indexes & tables ...");
    try
    stmt.executeUpdate("DROP INDEX PK_ClientNameTaxNrs ON ClientNameTaxNrs");
    catch (Exception e)
    System.out.println("Could not drop primary key on ClientNameTaxNrs table: "
    + e.getMessage());
    try
    stmt.executeUpdate("DROP TABLE ClientNameTaxNrs");
    catch (Exception e)
    System.out.println("Could not drop ClientNameTaxNrs table: "
    + e.getMessage());
    ///////// Create the database tables /////////////
    System.out.println("\nCreating tables ............");
    // Create ClientNameTaxNrs table with primary key index
    try
    System.out.println("Creating ClientNameTaxNrs table with primary key index...");
    stmt.executeUpdate("CREATE TABLE ClientNameTaxNrs("
    +"ClientName TEXT(50) NOT NULL "
    + "TaxNr TEXT(10) NOT NULL, "
    +")");
    catch (Exception e)
    System.out.println("Exception creating ClientNameTaxNrs table: "
    + e.getMessage());
    // Read and display all ClientNameTaxNrs data in the database.
    ResultSet rs = stmt.executeQuery("SELECT * FROM ClientNameTaxNrs");
    System.out.println("Database created.\n");
    System.out.println("Displaying data from database...\n");
    System.out.println("ClientNameTaxNrs table contains:");
    byte[] buf = null;
    while(rs.next())
    System.out.println("Client Name: = "
    + rs.getString("ClientName"));
    System.out.println("Tax Nr: = "
    + rs.getString("Tax Nr"));
    rs = stmt.executeQuery("SELECT * FROM ClientNameTaxNrs");
    if(!rs.next())
    System.out.println("ClientNameTaxNrs table contains no records.");
    else
    System.out.println("ClientNameTaxNrs table still contains records!");
    rs = stmt.executeQuery("SELECT * FROM ClientNameTaxNrs");
    if(!rs.next())
    System.out.println("ClientNameTaxNrs table contains no records.");
    else
    System.out.println("ClientNameTaxNrs table still contains records!");
    stmt.close(); // closing Statement also closes ResultSet
    } // end of main()
    } // end of class
    ================================================
    here is the run time errors. How do i fix this ?
    Dropping indexes & tables ...
    Could not drop primary key on ClientNameTaxNrs table: [Microsoft][ODBC Microsoft
    Access Driver] Cannot find table or constraint.
    Could not drop ClientNameTaxNrs table: [Microsoft][ODBC Microsoft Access Driver]
    Table 'ClientNameTaxNrs' does not exist.
    Creating tables ............
    Creating ClientNameTaxNrs table with primary key index...
    Exception creating ClientNameTaxNrs table: [Microsoft][ODBC Microsoft Access Dri
    ver] Syntax error in CREATE TABLE statement.
    Exception in thread "main" java.sql.SQLException: [Microsoft][ODBC Microsoft Acc
    ess Driver] The Microsoft Jet database engine cannot find the input table or que
    ry 'ClientNameTaxNrs'. Make sure it exists and that its name is spelled correct
    ly.
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6879)
    at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7036)
    at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:3065)
    at sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:338)
    at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(JdbcOdbcStatement.java:2
    53)
    at MakeDB.main(MakeDB.java:69)
    Press any key to continue . . .

    Are you running Norton Internet Security or anything similar? There have been reports that Norton and similar firewall products treat an upgrade as a new application and so you have to go in and reallow connections for iTunes. Check the settings and if necessary remove and re-enable the exception for iTunes (consult your privacy filter's documentation for the appropriate procedure). You may also need to check the built-in Windows firewall as well.
    Hope this helps.

  • Need help with switch/case

    Thanks in advance.
    I read the tut on switch statements. My assignment is asking me to do something that is not detailed in that explanation ;
    I have a total of 5 case statements, 1-4 and a default statement. The instructions for them are as follows:
    Case 1: If the user enters a 1, display a message that informs users they are correct, as any input canbe saved as a String. Enter the break statement.
    Case 2: If the user enters a 2, parse the value into tryInt. Display as message that informs the users they are correct. Enter the break statement.
    Case 3. If they user enters a 3, parse the value into tryDouble. Display a message tha t informs users they are correct. Enter the break statement.
    Case 4: Set done equal to true. Enter code to display a closing message. Enter a break statement.
    Case default: throw a new NumberFormatException.;
    Here is the code
    import java.io.*;
    import javax.swing.JOptionPane.*;
    public class MyType1
         public static void main(String[] args)
              //declaring variables
              String strChoice, strTryString, strTryInt, strTryDouble;
              int choice, tryInt;
              double tryDouble;
              boolean done = false;
              //loop while not done
              while (!done)
                   try
                        choice = Integer.parseInt(strChoice);
                        switch(choice)
                             case 1:
                                  JOptionPane.showMessageDialog(null,"You are correct!");
                                  break;
                             case 2:
                                  choice = Integer.parseInt(tryInt); JOptionPane.showMessageDialog(null,"You are correct!");
                                  break;
                             case 3:
                                  choice = Double.parseDouble(tryDouble);
                                  JOptionPane.showMessageDialog(null,"You are correct!");
                                  break;
                             case 4:
                                  done = true; JOptionPane.showMessageDialog(null,"Goodbye!");
                                  break;
    As usual Im doing something wrong. Please help.

    Thanks for your input. The directions for the assignment tells me to first declare the variables.
    Begin a while(!done) loop to repeat as long as teh user does not click the Cancel button.
    Inside a try statement, enter code to display an input box with three choices.
    Type choice = Integer.parseInt(strChoice); on the next line to parse the value for the choice entered by the user.
    (HERE THE SWITCH STATEMENT WITH CAST STATEMENTS)
    Close the switch statement with brackets
    Create a catch statement.
    import java.io.*;
    import javax.swing.JOptionPane.*;
    public class MyType1
         public static void main(String[] args)
              //declaring variables
              String strChoice, strTryString, strTryInt, strTryDouble;
              int choice, tryInt;
              double tryDouble;
              boolean done = false;
              //loop while not done
              while (!done)
                   try
                        String message = "What is My Type:" + "\n\n1) String\n2)Integer\n3)double\n4)Quit the program\n\n";
                        choice = Integer.parseInt(strChoice);
                        //test for valid choice 1, 2, 3, or 4
                        if (choice<1 || choice>4) throw new NumberFormatException();
                        else done = true;
                        switch(choice)
                             case 1:
                                  JOptionPane.showMessageDialog(null,"You are correct!");
                                  break;
                             case 2:
                                  choice = Integer.parseInt(tryInt); JOptionPane.showMessageDialog(null,"You are correct!");
                                  break;
                             case 3:
                                  choice = Double.parseDouble(tryDouble);
                                  JOptionPane.showMessageDialog(null,"You are correct!");
                                  break;
                             case 4:
                                  done = true; JOptionPane.showMessageDialog(null,"Goodbye!");
                                  break;
                   catch (NumberFormat Exception e)
                        JOptionPane.showMessageDialog(null, "Please enter a 1, 2, 3 or 4:",  "Error", JOptionPane.INFORMATION_MESSAGE);
              }Typing this now, I see I dont have anything in my try statement entering code to display an input box with three choices.
    (PS. I know I would write a catch statement for the NumberFormatException, but why would I also write this exception in the case statement also??)

  • Help with Test Server & Binding Recordset ASP-SQL

    Using CS 3.3/DW. Behavior is the same on two different
    machines. One is Vista Home Premium SP1 IIS 7 with 6 compatability,
    other is XP SP 3 IIS 5.1, both have IE 7 and full SQL 2005 with
    SP's.
    Haven't gotten very far away from static page yet, because I
    can't test. Have scoured forums and even talked to Adobe who
    recreated the problem then told me that they hadn't done sufficient
    testing to SQL 2005 prior to release, were supposed to call me
    back, did once, supposed to call back again and haven't (3 days).
    So I'm turning to the community for help, please.
    Set up test server in folder 'TServer' under
    C:\inetpub\wwwroot. Built a 'Hello World' ASP/VB Script page with
    no data attached, tests fine, puts in the appropriate folder and
    says "Hello World" in browser like a good little box should! Have
    built many DSN's, they tested during the building fine, I've tried
    various versions of ODBC and OLE DB, including but not limited to
    Native SQL Client, which is my preference and have been quite
    successful setting up the DSN's...they add to the ASP page/Site
    (it's greyed out unless you have an open ASP page) fine. Test at
    that point works fine. As soon as I bind a Recordset (whether I
    have dropped data on the page or not...same 'Hello World' page with
    Recordset info near the top of the code) and test, I error out.
    Any thoughts? I'm sure you'll need more info...I've tried to
    put as much as I can for starters. Thanks in advance.
    Peter

    When you say that you error out, what error are you getting?
    Ken Ford
    Adobe Community Expert - Dreamweaver/ColdFusion
    Fordwebs, LLC
    http://www.fordwebs.com
    "Peter AZ" <[email protected]> wrote in
    message news:g5qb7n$n30$[email protected]..
    > Using CS 3.3/DW. Behavior is the same on two different
    machines. One is Vista
    > Home Premium SP1 IIS 7 with 6 compatability, other is XP
    SP 3 IIS 5.1, both
    > have IE 7 and full SQL 2005 with SP's.
    >
    > Haven't gotten very far away from static page yet,
    because I can't test. Have
    > scoured forums and even talked to Adobe who recreated
    the problem then told me
    > that they hadn't done sufficient testing to SQL 2005
    prior to release, were
    > supposed to call me back, did once, supposed to call
    back again and haven't (3
    > days). So I'm turning to the community for help, please.
    >
    > Set up test server in folder 'TServer' under
    C:\inetpub\wwwroot. Built a
    > 'Hello World' ASP/VB Script page with no data attached,
    tests fine, puts in the
    > appropriate folder and says "Hello World" in browser
    like a good little box
    > should! Have built many DSN's, they tested during the
    building fine, I've tried
    > various versions of ODBC and OLE DB, including but not
    limited to Native SQL
    > Client, which is my preference and have been quite
    successful setting up the
    > DSN's...they add to the ASP page/Site (it's greyed out
    unless you have an open
    > ASP page) fine. Test at that point works fine. As soon
    as I bind a Recordset
    > (whether I have dropped data on the page or not...same
    'Hello World' page with
    > Recordset info near the top of the code) and test, I
    error out.
    >
    > Any thoughts? I'm sure you'll need more info...I've
    tried to put as much as I
    > can for starters. Thanks in advance.
    >
    > Peter
    >
    >

Maybe you are looking for

  • HP Office Pro L7480 All in One Printer only prints half test page then stops - Windows 8.1

    Hi wonder if anyone can help with this one Just replaced an old pc with a new Windows 8.1 Machine I have 2 printers - An A3 HP printer and the Office Pro L7480 My A3 printer prints fine but the Office Pro starts to print a test page....gets half way

  • How to delete an email address from appearing in "iCal File New Calendar"?

    I've already removed the email from my Address Book & Mail Program (previous recipients, accounts, etc.) and the email address I no longer use is still showing up in iCal under New Calander & New Reminder Group. I don't want to see this address appea

  • BDC for Transaction F-92

    Hi All, Can anybody send the BDC program for the F-92 t-code. Thanks and regards, krish......... Moderator message: please search for information and try yourself before asking. Edited by: Thomas Zloch on Nov 9, 2011 1:24 PM

  • Solution Manager Key for EP '04 - EP 2004s

    Well, we just started the upgrade of our EP '04 SP18 to EP 2004s ST11. However, the PREPARE is rejecting the Solution Manager Key (generated in SSM 3.2). We came across OSS Note 811923 which says: For SAP ERP 2004 (SAP ECC 5.0), you require SAP Solut

  • Restrict size of payload for OSB Proxy

    Hi, I have a requirement where I need to restrict the size of payload my OSB Proxy should accept. Example anything > 1 MB should not be accepted. I know there we can set the HTTP " Max Post Size"  in weblogic but that would be at Domain level . I wou