GetTableName using ResultsetMetadata. Not support ???

I am using JDBC driver for MS SQL Server 2000 to connect to SQL Server 2000. In this I need to know the tablename of columns in the underlying query structure of the Resultset. The resultsetmetadata method getTableName() is not supportive. It returns "".
My code :
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
conn = DriverManager.getConnection("jdbc:microsoft:sqlserver://DBTest:1433","sa","");
strSQL = "SELECT * FROM Test.dbo.tables1";
stmt = conn.createStatement();
rs = stmt.executeQuery(strSQL);
ResultSetMetaData rsmd = rs.getMetaData();
System.out.println("strTableName = " + rsmd.getTableName(1));
Can anybody help me in this regard. Any concerns are appreciated.
Thanks a lot.

Since you are selecting from a table, you already have the table name in the SQL, so I'm not sure what you are really trying to get at with your code.
That said, if you need to get the table names from the database, you have to query the database to fetch the table names.
The following code dumps all the tables by schema and type after connecting to SQL Server:
* ConnectApp.java
* Created on September 9, 2002, 11:22 AM
* @author  rweaver
import java.sql.*;
import java.util.*;
class ConnectApp {
    public static void main(String args[]) {
        try{
            // Load the driver
            Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
            // Connect to the database
            Connection connection=DriverManager.getConnection("jdbc:microsoft:sqlserver://myhost:1433;databasename=pubs","myUser","myPassword");
            // Get database meta data
            DatabaseMetaData meta=connection.getMetaData();
            // Display meta data information
            System.out.println("Database: "+meta.getDatabaseProductName());
            System.out.println("Product version "+meta.getDatabaseProductVersion());
            System.out.println("User name: "+meta.getUserName());
            System.out.println("Driver: "+meta.getDriverName());
            System.out.println("Driver version: "+meta.getDriverVersion());
            System.out.println("SQL keywords: "+meta.getSQLKeywords());
            System.out.println("===================================");
            System.out.println("Schema term: "+meta.getSchemaTerm());
            System.out.println("===================================");
            System.out.println("Catalog term: "+meta.getCatalogTerm());
            System.out.println("===================================");
            ResultSet rsSchema = meta.getSchemas();
            String [] sa = { "none" };
            while (rsSchema.next()) {
                System.out.println("For " +meta.getSchemaTerm()+ " " + rsSchema.getString(1));
                ResultSet rsCatalogs = meta.getCatalogs();
                while (rsCatalogs.next()) {
                    System.out.println("\tFor " + meta.getCatalogTerm() + " " + rsCatalogs.getString(1));
                    ResultSet rsTableTypes = meta.getTableTypes();
                    while (rsTableTypes.next()) {
                        sa[0] = rsTableTypes.getString(1);
                        System.out.println("\t\tFor TableType '"+sa[0]+"'");
                        System.out.println("\t\t===================================");
                        ResultSet rsTables = meta.getTables(rsCatalogs.getString(1), null, "%", sa );
                        ResultSetMetaData mdTables = rsTables.getMetaData();
                        int columnCount = mdTables.getColumnCount();
                        for(int i=1; i<columnCount; i++) {
                            System.out.print("\t\t" + mdTables.getColumnName(i) + "\t");
                        System.out.println("");
                        while (rsTables.next()) {
                            for(int i=1; i<columnCount; i++) {
                                System.out.print("\t\t" + rsTables.getString(i) + "\t");
                            System.out.println("");
                        rsTables.close();
                    rsTableTypes.close();
                rsCatalogs.close();
            rsSchema.close();
            // Close the database
            connection.close();
        }catch(Exception ex){
            System.out.println(ex);
            System.exit(0);
}

Similar Messages

  • I keep getting the following error message---"We're sorry but the Safari browser version you are currently using does not support the community toolbar."

    When I log in I get this message I keep getting the following error message---"We're sorry but the Safari browser version you are currently using does not support the community toolbar."
    Also, I can seem to down load my Adobe Flash, I did download what I thought was the correct down load for Safari, but I'm still getting this message "We're sorry but the Safari browser version you are currently using does not support the community toolbar."  I was even going to purchase the Leopard for 29.99 to see would this solve my problem but I want to purchase another pc and sale this one, can you help me?
    Thank you

    See this link.
    Also look at More Like This on the right side of these pages for realted threads on this topic (and on the pages those link to).

  • I keep getting an error message that says the safari browser version you are currently using does not support the community toolbar.  how do I fix it?

    Everytime I open my imac I get an error message that says: "We're sorry but the Safari browser version your are currently using does not support the community toolbar."  I can't see where it affects anything else, but getting an error message on an imac, just doesn't seem right, ya know?  How can I get rid of the message. 

    Apparently an add-on named Community Toolbar was installed at one time, and is causing the problem. To get rid of it, quit Safari, then throw away these files -
    Macintosh HD/Library/Application Support/Conduit
    Macintosh HD/Library/InputManagers/CTLoader
    Macintosh HD/Library/Receipts/ctloader.pkg
    Macintosh HD/Library/Receipts/<Toolbar name>.pkg
    Macintosh HD/Library/Application Support/SIMBL/Plugins/CT2285220.bundle
    Macintosh HD/Users/<User name>/Library/Application Support/Conduit
    Note - if you are using Lion, the Library folder in your home folder (user name folder) is hidden. To get into it, in Finder open the Go menu; with that menu open, press and hold the Option key. An item "Library" will be added to the list, and can then be selected. That will open the Library folder in your home folder.

  • JavaScript required. The browser that you are using does not support JavaSc

    I keep on getting this message when I'm trying to log on to Hotmail
    JavaScript required. The browser that you are using does not support JavaScript, or you may have disabled JavaScript
    And my browser (IE 6) cannot go to any java links. They either don't load or they are blank pages. I tried installing java, enabling them on the internet options, and even installed a new browser it is still the same thing!!!
    I'm very pissed right now but I really really need some help. Sorry for the inconvenience.
    Thank you, Zaragon

    JavaScript is different from Java. Somehow, security has gotten turn on in IE. If you go to tools, internet options, security, then look at Internet (for hotmail anyway), hit the custom level button, you will see that scripting has been disabled.

  • Why when i click to open safari does it keep telling me the safari browser version i am using does not support the community toolbar ?

    Why when I am clicking into safari does a message appear telling me that the Safari Browser version I am using does not support the community toolbar ???

    You installed the Conduit spyware. To remove it, back up all data, then follow these instructions.
    If the instructions don't work, proceed as follows.
    Triple-click the line below to select it:
    ~/Library/Application Support/Conduit
    Copy the selected text to the Clipboard (command-C). From the Finder menu bar, select
    Go ▹ Go to Folder…
    Paste into the box that opens (command-V), then press return. A Finder window should open with a folder named "Conduit" selected. If it does, delete the selected item.
    Repeat with this line:
    /Applications/Toolbars
    Now you're deleting a folder named "Toolbars". You may be prompted for your login password. Next, copy this line:
    /Library
    Select Go to Folder… again and paste. Don't delete the Library folder. Delete only the following items inside it, if they exist.
    Application Support/Conduit
    InputManagers/CTLoader
    LaunchAgents/com.conduit.loader.agent.plist
    ScriptingAdditions/ct_scripting.osax
    Close the Finder windows you opened. Log out and log back in.
    I've seen a report that Conduit may be bundled with a scam "utility" called "MacKeeper." If you installed MacKeeper, you should remove it according to the developer's instructions. It's worthless and causes many problems reported on this site.

  • I get a message that says "Safari browserversionyou are currently using does not support the community toolbar

    I get an annoying message everytime I open Safari. It reads - "Safari browser version you are currenty using does not support the commuinty toolbar" How do I get rid of this

    victoria Hamlin wrote:
    it didn't... but at least I know where to find the Library-  any other ideas?
    Instead of being installed as a standard plug-in, the Community Toolbar uses the system loader "launchd" to load the plugin on-demand whenever Safari is opened. You will need to remove three components that are installed, starting with the binary files.
    The binary file is the actual toolbar application, and is located in the /Library/InputManagers/CTLoader/ folder. Removing the entire CTLoader folder will remove the application and other files that are installed along with the toolbar. If you just care to quickly stop the toolbar from loading, doing this will be enough to keep it from loading.
    With the binary file removed, the toolbar will no longer launch; however, the system will still try to load it when Safari is opened because the system launcher instructions file is still installed. While having these instructions present will not cause a decrease in performance, removing them will prevent the system from outputting errors and warnings in the system log files.
    Removing only this instructions file is another way to stop the toolbar from loading; however, it will require either the use of the following command in the Terminal (done before removing the file) or a restart of the system after removing the file to unload the instructions from the system loader and prevent the toolbar from launching.
    sudo launchctl unload /Library/LaunchAgents/com.conduit.loader.agent.plist
    The final components to the toolbar are some resources that it uses, which are relatively benign and will become unused "orphaned" files when the other components of the toolbar are removed. These files are all located in the /Macintosh HD/Library/Application Support/ folder in a directory called Conduit. Remove this directory and the toolbar in its entirety will be removed.

  • When I start my computer the safari icon jumps up and down and i get a note: 'Community Toolbar' I'm sorry, but Safari browser version you are currently using does not support the community toolbar.  How do i get rid of this

    when I start my computer the safari icon jumps up and down and i get a note: 'Community Toolbar' I'm sorry, but Safari browser version you are currently using does not support the community toolbar.  How do i get rid of this?

    Carolyn Samit has answered this question before.  I did it with this info.  Thank you Carolyn for your awesome help.

  • The Safari browser version you are currently using does not support the community toolbar.

    the Safari browser version i am currently using does not support the community toolbar. And Iam using googel chrome now but not happy about this problem .
    I would like to fixe it .
    Many thanks

    never mind.. I got rid of it already!

  • Every time I open Safari, I get a message (and a pop-up) that says the Safari browser I'm using does not support Community Toolbar. How can I get rid of the Community Toolbar or at least turn it off?

    Every time I open Safari, I get a message (and a pop-up) that says the Safari browser I'm using does not support Community Toolbar. How can I get rid of the Community Toolbar or at least turn it off?

    That toolbar/ct plugin seems to cause problems for all who install it!
    Close Safari, then locate and delete the following files and it should be gone:
    /Library/Application Support/Conduit
    /Library/InputManagers/CTLoader
    /Library/Receipts/ctloader.pkg
    /Library/Receipts/<Toolbar name>.pkg
    /Library/Application Support/SIMBL/Plugins/CT2285220.bundle
    /Users/<User name>/Library/Application Support/Conduit
    where / is the root library on your Hard Disk.
    If you are running Snow Leopard you should also look here:
    Library/launchAgents/com.conduit.loader.agent.plist
    Library/Application support/conduit plugins
    Note: Safari does not support any third-party toolbars except those supplied as an extension to Safari via the Extension Gallery.

  • Secure zone - ERROR: The payment gateway that you are using does not support recurring payments

    So I want to sell a product that is made up of 4 downloadable products. (Totalling ~ 200meg)
    The only way I have found is to sell membership to a secure area where the files are linked.
    When I create the secure zone, I want a one-time-fee, but the system says:
    "ERROR: The payment gateway that you are using does not support recurring payments"
    The payment isn't recurring!
    Micah

    "Note that you have to use seamless gateway to process such payments."
    Right, but that's the problem, we're not usiong a seamless gateway and thus we get the error.  Again, the system should note that we're doing a one-time charge and not throw the seamless gateway error.
    Micah

  • The technology or driver used does not support reverse engineering MySQL

    Hi all,
    I have a little problem.
    When I am trying create a mode in Designerl based on a MySQL Data Store that is created in the Topology manager, I get an exception stating;
    "The technology or driver used does not support reverse engineering
    java.lang.NullPointerException
         at com.sunopsis.dwg.reverse.Reverse.a(Reverse.java)
         at com.sunopsis.dwg.reverse.Reverse.setMetaData(Reverse.java)
         at com.sunopsis.graphical.frame.b.ip.a(ip.java)
         at com.sunopsis.graphical.frame.b.ip.a(ip.java)
         at com.sunopsis.graphical.frame.b.hq.b(hq.java)
         at com.sunopsis.graphical.tools.utils.swingworker.v.call(v.java)
         at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
         at com.sunopsis.graphical.tools.utils.swingworker.l.run(l.java)
         at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
         at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
         at java.lang.Thread.run(Unknown Source)"
    I can see the table I want to reverse from when going into the the tab "Selective Reverse" but it the reverse fails with the error message above.
    I would really appreciate any help on this topic. I am using MYSQL Server 5.1 and ODI 10.1.3.5.
    Thanks in advance
    Peter

    Hello,
    it seems to be working now. The only change I did was to increase the java heap size, but it feels a bit strange that it should have anything to do with the problem in question.
    Anyway thanks very much for your help.
    Best Regards
    Peter

  • CUCM 9.1 in VirtualBox - The hardware you are using is not supported for this product

    I'm trying to load CUCM licensed through my work onto an oracle VirtualBox running linux redhat, and its unpacking linux fine onto the vbox, and passes the hardware test on boot but when it goes to load I'm getting the error "The hardware you are using is not supported for this product."
    I have dedicated to the VM:
    4GB ram
    4 CPU's (tried 2 and 4)
    80GB Hard Drive
    What in the world could be jamming this up? Anyone else ever run this or know what the deal is?
    Any input is appreciated, thanks!

    We only support ESXi
    Sent from Cisco Technical Support iPad App

  • Cannot use program, not supported by architecture?  I have a MacBook running 10.5 and have a Snow Leopard upgrade disk to 10.6.3, and that is the error message that I keep getting as to why my update won't install.

    I have a MacBook that I am trying to upgrade to Snow Leopard so that I may upgrade it then to Lion to make better use of my iPad and some of the n we tools that Apple has made available in Lion.  I have checked and double checked that my MacBook meets the hardware expectations, and it does exceed the ones for Snow Leopard.  however, every time that I try to run the install disk it tells me that the program is not supported by the current architecture.  I have even tried to backend the processes by opening the install folder with "View Package Contents" option, but it still gives the same error message!  Someone please help! 

    Obtain one of these Snow Leopard DVDs instead. They are not expensive.
    To get one, there are some details at this link.
    https://discussions.apple.com/thread/4368218

  • Using types not supported in JAX_RPC

    Hi every body,
    How can i use data types which are not supported in JAX_RPC ?
    types such as " Date",...
    thanx

    I have exactly the same problem.
    how you solved this issue?

  • "Safari browser version you are currently using does not support the community toolbar."

    I'm looking for a solution to this error message that pops up every time I restart the comp. I looked in Toolbar folder and it doesn't contain anything. Someone said to go to Library and go through a process but I don't know where it is. Can someone get me started and I'll try those steps. Or does someone have another solution to get rid of this error message?

    That toolbar/ct plugin seems to cause problems for all who install it!
    Close Safari, then locate and delete the following files and it should be gone:
    /Library/Application Support/Conduit
    /Library/InputManagers/CTLoader
    /Library/Receipts/ctloader.pkg
    /Library/Receipts/<Toolbar name>.pkg
    /Library/Application Support/SIMBL/Plugins/CT2285220.bundle
    /Users/<User name>/Library/Application Support/Conduit
    where / is the root library on your Hard Disk.
    If you are running Snow Leopard you should also look here:
    Library/launchAgents/com.conduit.loader.agent.plist
    Library/Application support/conduit plugins
    Also, as mentioned by Gilli2000:
    Library/Receipts - If you read it, it has information in it at the bottom referring extensively to "CT" and "community toolbar".
    Maybe it is harmless, but trash those items anyway!
    Note: Safari does not support any third-party toolbars except those supplied as an extension to Safari via the Extension Gallery.

Maybe you are looking for

  • How to physically hook up for extended dual display

    This was originally posted in another wrong topic section today, which was incorrect. I have a flat panal PC (windows XP) as well as my iMac G5. I would like to hookup the iMac to the PC so that I can extend my PC Desktop onto the iMac. I have a Appl

  • Video performe horribley both with QT and youtube, beach ball ****.

    I have no idea why but since the last update all my QT movies play back about only 4 secs of video, then i hear sound but the picture gets stuck, then on YouTube i get nothing but the beach-ball, i have to force quit firefox etc etc Anyone else exper

  • ADF jdev 11g portlet   in Weblogic Portal 10G R3?

    Is possible to build a ADF Jdev 11g portlet and deploy it in a Weblogic Portal 10g R3?

  • Writing a web server.

    i am trying to write a tiny web server, with a gui, and want the gui to be a able to stop and start the server, the server is in a separate class called web server, and i need some code to destroy the instance of the class. thx in advance.

  • Help please with button!

    Hi, I am new to edge Animate. I would to like to know how could I click on a box (lets say it is a button) and then a .gif animation is going to be revealed?