Getting KEYS from a database!

Hi Everybody,
I have a serious problem! I have to get the Keys(Column Names) from a Database (MS-ACCESS) Table.
JDBC2.0 contains a class called DatabaseMetaData. It has functions like getPrimaryKeys(), getImportedKeys() and getExportedKeys(), all of which I have to use. But I'm unable to access these functions because the "Driver does not support these functions". I tried using the JDBC-ODBC driver, IDS Server Driver and the JDataConnect drivers. All of them gives the same error message.
Is there any way to get the Keys from the table?
I found a way to get the Primary Keys - I'm getting it from the Indexes - getIndexInfo() function.
But I haven't found a way to get the Foreign keys and other keys in the tables.
Does anybody know how to get the keys from an MS-ACCESS database?
Thanks,
TechnoSam.

The JDBC API is mainly a set of interfaces required to be implemented by the JDBC Driver vendor. Because these are interfaces, the vendor is free to actually implement whatever logic they see fit, but of course they will implement what is required.
I would suspect if you are getting a 'Not supported by Driver' type error, it is because the vendor had to implement that method, but did not implement it with code that does the desired logic.
Most likely, this was either very, very hard to do or just could not be done give that the driver was written for a particular database.
If this is something you need, I can only suggest trying to write a procedure (can you do that in MSAccess?) which does the logic you need (in Access) and returns the info you want. You can then access it via a CallableStatement.
Hope this helps.

Similar Messages

  • How can i get data from another database SQL Server use database link from

    I have a database link from Oracle connect to SQL Server database with user cdit connect default database NorthWind.How can I get data from another database(this database in this SQL Server use this database link)?

    hi,
    u should see following documentation:
    Oracle9i Heterogeneous Connectivity Administrator's Guide
    Release 1 (9.0.1)
    Part Number A88789_01
    in it u just go to chapter no. 4 (using the gateway),,u'll find ur answer there.
    regards
    umar

  • How can i  get data from anather database system  ????????

    Hi every body..
    I 've a problem .....
    I've an old program work on "DOS" and it's content database which content all Data that i need for that program
    The data file extension with ".FD" , ".VW" , ".LSS" & "SLP"
    I want to kow:-
    1) what is that database system
    2)What program could open or can get data from that database tables.
    3)can i do that with oracle...
    please describe every thing in details...
    ... Please replay quickly... urgently
    ...waiting your answer....

    You're probably better off consulting the documentation for the DOS program you're trying to deal with than hoping someone here will be able to guess what program you're using, identify the structure of the files, and tell you how to extract the data into something Oracle can import.
    Justin

  • Single query to get data from different databases

    i need to capture certain fields from certain tables in database 1 and certain fields from certain tables in database 2 into one file using a single SQL statement.
    i tried searching on the net
    i found that dblinks can help
    but iam not sure if ill be able to create dblinks in my situation which is:
    i need to get data from oracle to be copied to mysql
    this is not a replication acitivity, but i need certain fields from one database and certain from the other
    so what iwas thinking is, if i use an sql query to get all the fields (i need around 40) from the different oracle databases and create a singlefile with one insert per select, i can then read that file into mysql
    instead of creating multiple sql queries for each table and creating separate files and eventually separate tables in mysql.
    can anyone help me here?
    or maybe suggest another approach.
    thanks

    Hi,
    I think dblink is the only option available to get data from different databases. It will work for your case too.
    CREATE DATABASE LINK db_link CONNECT TO user_name IDENTIFIED BY  password USING 'instance_name'you must have the system privilege 'create database link' to create db links. This way you can get the required data and put it in a table in oracle. But i dont know how to put this data from oracle table to Mysql.
    HTH
    Muneer

  • How to get key from MDX Query

    Hi All,
    how to get key from mdx query ?
    example :
    SELECT [Measures].[67822GFASOU7KUT6FKHSQ34FV] ON COLUMNS NON EMPTY CROSSJOIN([ZCOMPANY].MEMBERS, [ZMILL].MEMBERS) ON ROWS FROM ZODS_GL/ZODS_GL_001
    the result from this mdx query are zcompany text and zmill text, how to get company key and mill key ?
    Regards
    JeiMing

    hi Jeiming,
    to get key in mdx, you can try something like
    [ZCOMPANY].[LEVEL01].MEMBERS
    properties [ZCOMPANY].[2ZCOMPANY]
    following threads may useful
    Extracting texts with MDX
    MDX Statement - display only keys for characterstics and their dis. attrib.
    hope this helps.

  • Get data from two databases?

    Hello all,
    Do anyone know if it's posible to get data from two databases while I'm running SBO in one of them? I need this because our client wants to be able to print reports with all the information stored in both companies. I searched this forum trying to find if this is possible but I did't find any information about this.
    Can someone help me?
    Thanks and regards,
    Mariana Mazzero

    Hi Mariana,
    What you can do is use two company objects to retrieve the data. As far as I know you're not restricted to one company connection.
    You can also just use a standard read only connection (like ADO/ODBC) to retrieve the data for the reports.
    Hope it helps,
    Adele

  • How can I get keys from Hashtable in the same order?

    Hello, everyone.
    I have a Hashtable containing key-value pairs, I need to get the keys in the same order as I use
    method put(key,value) to save the key-value pairs. But I can only find Hashtable.keys() to fetch the keys in form of Enumeration and when retrieve the keys from the Enumeration,they are not in the original order!
    The following is my code:
    Hashtable ht = new Hashtable();
    ht.put("Name","Harry Bott");
    ht.put("Gender","Male");
    ht.put("Age","25");
    String[] Items = new String[ht.size()];
    Enumeration e = ht.keys();
    int i = 0;
    while(e.hasMoreElements()) {
    Items[i++] =(String)(e.nextElement());
    The Items contains the keys but they are not in the original order.
    Does anyone know how to get the keys from a Hashtable in the same order when they're put?
    Thank you!

    yeah, another solution is to stored keys on a Collection at the same time you put them on the HashMap with its values.
    Then when ur going to retrieve objects from the Map u iterate the Collection that has the ordered keys and use them.

  • How do I get  key from Apple to download Mac office?

    How do I get a key from Apple to download Mac Office?  I have a CD for 2008 but not a drive to load it. Do I get free upgrades or do I need to purchase them?

    You get it from Microsoft. http://www.microsoft.com/mac/products?aspxerrorpath=/blog-archive/Office-for-Mac -Keyboard-Shortcuts--Excel/2/filter/category.Office%202008

  • Getting data from several database

    I have more that one DB in different locations, but all of them have a same structure. now i want to get data from all of the DBs in a unique time and simultaneously. how i can do it?

    If all the databases are Oracle then open your DBA Administration manual to Part VII Distributed Database Management.
    These chapters will tell you how to create database links and how to design and manage remote and distributed transactions.
    Also see the CREATE DATABASE LINK command in the SQL manual.
    Once you have reviewed this material you can post back with specific questions or error messages you encounter while configuring the feature.
    Basically you just need a tnsnames.ora entry on the database server for the remote database and then define a database link that references the tnsnames.ora entry. The documentation will show you the steps.
    HTH -- Mark D Powell --

  • Get value from Direct Database Request

    Hi Experts,
    I have report based on Direct Database Request which returns one row. I have to use value from this report in other one.
    So, I have to get value from query and set into some variable but I don't know there is any way to do it.
    Thanks in advance for any suggestion
    Regards,
    Esk

    Thank you for your reply, but I don't want to use variable in Direct Database Request in clausal 'WHERE' or 'IN'.
    I want value which returns query. For example if my Direct Database Request is : 'Select ID from table1', then
    I wand this 'ID' in variable to use it in other report.
    regards
    Esk
    Edited by: Eskarina on 21-may-2012 2:16

  • ONLY ONE FIELD DOES NOT GET PREPOPULATED FROM THE DATABASE

    I would really, really appreciate if someone can comment or suggest something that would help with the resolution to the issue I am currently experiencing.
    Simple sample form that explains the issue can be accessed from the link below.
    How to test the form:
    Open the form.
    Click on the yellow button to add new Task.
    The problem is with Additional Product fields ( in blue). You can add as many of them as you want by clicking on the Red button with the +. Add some data and uploade in database. When you download it from the database, data will come back fine for all of them, except for the first one.
    Any ideas or help would be greatly appreciated.
    https://acrobat.com/#d=2vFWOlm56FmrC4owzpfHew 
    The code is behind the Red button with the +. Very  simple. Perhaps is the indexing issue with the database. I do not know enough about it, to be able to send any suggestion to the DB guy.
    According to the DB guy, data uploades without issue. It is the blank field when the form with data is downoloaded.

    It might be related to http://forum.java.sun.com/thread.jspa?threadID=583466&messageID=2988344

  • How to get just the key from a database ?

    Hello, the sample at FAQs was not enought to me...
    My code to retrieve just the key (Exists this record ?).
    //     Checks if the ticket exists in the database.
    BOOL     CDSDBBD::TicExist(     char     *pcaTicCod)
         int          iResult;
         int          iLen;
         Dbt          dbtKey;
         Dbt          dbtData;
         char     caError[256];
         iLen     =     strlen(pcaTicCod);
         dbtKey     .set_data((void*) pcaTicCod);
         dbtKey     .set_size(iLen);
         dbtData     .set_flags(DB_DBT_PARTIAL);
         dbtData     .set_dlen(0);
    //     dbtData     .set_size(0);
    //     dbtData     .set_doff(0);
    //     dbtData     .set_data(NULL);
         try
              iResult     =     m_pdbTic->get(NULL, &dbtKey, &dbtData, 0);
         catch(DbException &e)
              m_pdbRafCal->err(e.get_errno(), "Error!");
              sprintf(caError,     e.what());
         catch(std::exception &e)
              m_pdbRafCal->errx("Error! %s", e.what());
              sprintf(caError,     e.what());
         if(iResult != 0)
              return     FALSE;
         return     TRUE;
    all times i got "Db::get: Invalid argument".
    Thanks,
    DelNeto

    Thanks Alexander.Gorrod, the return value, from get, was "-858993460", but the error code at exception was "-30999", that is DB_BUFFER_SMALL. The final code look like this:
    memset(&dbtData, 0, sizeof(dbtData));
    dbtData.set_flags(DB_DBT_USERMEM);
    dbtData.set_ulen(0);
    try
    // You can then call get as you would normally:
    iResult = m_pdbTic->get(NULL, &dbtKey, &dbtData, 0);
    catch(DbException &e)
    if(e.get_errno() == DB_BUFFER_SMALL)
    return TRUE;
    catch(std::exception &e)
    sprintf(caError,     e.what());
    return FALSE;
    Thanks for the tip,
    DelNeto

  • Need to get data from multiple database instances in a single query

    Hi,
    I need a small favour from you guys. The prob is as follows:
    I need to get name, row_id from table A from schema 1 and gbu_name, name from table B from schema 2 where a.name = b.name. I wrote the query in the following manner:
    SELECT a.name, a.row_id, b.gbu_name
    FROM Schema1.A as a, Schema2.B as b
    Where a.name = b.name
    But this query is not working and the error is like " The table does not exists".
    Please update me how to avoid the error and get the right sort of result.
    Thanks & Regards,
    Debabrata

    Ah, youre actually asking different things.
    In your topic title, you say youre running separate instances
    In your body text, you say you are under different user/schema
    So tell me, do you have more than one database or not? How many entries in your TNS file?
    I would say, for "multiple database instances"
    SELECT
      a.id, b.id
    FROM
      tableA a
      INNER JOIN
      tableB@OTHER_DATABASE_LINK_NAME b  <--NOTE!
      USING(id)And of course you will have to look up CREATE PUBLIC DATABASE LINK sql..
    Message was edited by:
    charred

  • Synchronized Send for getting results from the database

    I am new into XI. I have a scenario where id will be read from a file, a selection to be made from database and the results written to a file. I have created a BPM
    receiver -> synchroizedSend(JDBC) -> Send
    Please suggest me how to use Synchronized send to execute a query and getting the RsultSets.

    Hi
    Check this relative thread for the synchronous send step
    Synchronous Sending followed by Transformation
    were can i see synchronous send in the BPM editor
    Message was edited by:
            Anusha  Ramsiva

  • Getting data from SQL database

    Hi
    I am stil trying to get some basic information stored in a database table on my SQL Server.
    I can do this by embedding an Applescript do carry out the shell command 'curl' as below:
    myFullScriptString = "do shell script \"curl -0  localhost/asset.php?asset_id="+assetID+"\"";
    myForceError = app.doScript(myFullScriptString, ScriptLanguage.APPLESCRIPT_LANGUAGE);
    return(myForceError);
    but I dont want to be limited to OSX.
    Is there a way this can be put into a native socket comment using a structure as below?
    reply = "";
    conn = new Socket();
    conn.open("192.168.91.184:8888");
    conn.write(" GET /myfile.php?" + variousVariable + " HTTP/1.0\n\n");
    reply = conn.read(999999);
    conn.close;
    Cheers
    Roy

    Sigh...
    I'm sorry, Roy, I really thought that the example in the JS Tools Guide told you how to seperate the actual response from the server's headers. But it doesn't!
    Anyhow, RFC2616 tells us:
    6 Response
       After receiving and interpreting a request message, a server responds
       with an HTTP response message.
           Response      = Status-Line               ; Section 6.1
                           *(( general-header        ; Section 4.5
                            | response-header        ; Section 6.2
                            | entity-header ) CRLF)  ; Section 7.1
                           CRLF
                           [ message-body ]          ; Section 7.2
    So, that means the message body is seperated by two CRLF pairs. Except that because of API magic each CRLF turns into a single \n. So you want to look for \n\n.
    So, you should be able to seperate it like this:
    body = reply.substr(reply.indexOf("\n\n")+2);

Maybe you are looking for

  • Can't I like a review without Ping?

    I just upgraded to the latest version of iTunes and now apparently I can't rate someone else's review without signing up for Ping. (When I click on "Like" under a review it says "This requires Ping.") I have Ping turned off and have absolutely no des

  • How can I get a sound to play more than once using edge commons?

    Hi, I'm very new to all this; so apols if asking dumb stuff... I've successfully used Edge Commons to get an audio effect to play in a timeline but it will only play once. Does anyone know how I can get it to play again at various trigger points? The

  • Unable to update Premiere Pro 2014.0 to 2014.1 - Creative Cloud says it's 'up to date' (Mac - Yosemite)

    I have a creative cloud subscription and two computers. One at the office, and one at home. I started a project at the office and wanted to finish it at home. But Premiere Pro won't open the project at home because it says it was created with a highe

  • CameraRaw 4.4.1 Download Issue

    I am having a problem with installing the above plugin for PE6 on Mac OSX. The instructions on the adobe website say that I should remove the previous 4.3.1 before placing the 4.4.1 plugin in the suggested PE6/plug ins/file formats folder. However, t

  • Multi-Master Replication Limits

    I'm starting new project and would like ask your opinion. They like to have multi-master replication of a single table between Chicago and Denver. A record could be written in Denver, then same row read in Chicago. The opposite is also true. Replicat