How to get the field's type in the database with jdbc?

How to get the one filed's type(varchar,int,long...etc) with jdbc??
Can u help me??
It's best that giving a sample code..

Thx for your reply,BheegaChicken! But i use it with
oracle9i jdbc..It doesn't return to my the fields
type correctly..
This is problem is caused by oracle jdbc??
Can u tell me??It depends on the driver classes you are using... some of them don't have an implementation for those methods and you won''t get anything useful. Check the driver documentation.
***Annie***

Similar Messages

  • How to get the Database type from weblogic Db connection

    I want to use database version control in my application . that means different database type use different Sql Statement. Such as in weblogic7.0 if I create SqlServer JDBC pool then I will use some special Sqlserver sql Statement . such as some join statement. If I create Oralce JDBC pool then I have to use different Sql statement . because these two database support different Sql statement.
    What my question is how to get the database type from the connection.

    For a normal jdbc driver you can use
    Connection.getMetaData()
    To get the meta data, in particular the getDatabase...() methods.
    That might or might not work.
    However, at the very least in the server you have access to the weblogic properties so you can parse the pool property to figure it out.

  • How to get the table with no. of records after filter in webdynpro

    Dear Gurus,
    How to get the table with no. of records after filter in webdynpro?
    Thanks in advance.
    Sankar

    Hello Sankar,
    Please explain your requirement clearly so that we can help you easily.
    To get the table records from your context node use method get_static_attributes_table()
    data lo_nd_mynode       type ref to if_wd_context_node. 
    data lt_atrributes_table  type wd_this->elements_mynode. 
    lo_nd_mynode = wd_context->get_child_node( name = wd_this->wdctx_mynode ). 
    lo_nd_mynode->get_static_attributes_table( importing table = lt_atrributes_table ). 
    Note: You should have already defined your context node as a Dictionary Structure.
    BR,
    RAM

  • I have a problem with mail.  the spelling and grammer check box before sending the messege is no longer there.  I did everything but cannot get it back.  is ther anyone who knows how to get the box with spelling and grammer checks before sending

    i have a problem with mail.  the spelling and grammer check box before sending the messege is no longer there.  I did everything but cannot get it back.  is ther anyone who knows how to get the box with spelling and grammer checks before sending the mail.
    Also the mail is acting very funny by not getting the rules work in a proper method.  Is ther a software to repair mail.

    i did both of them, but still the while sending the mail the diolog box is not showing up and also the spelling and grammer does not do the spelling check. 
    This problem just started for about 3 to 4 days now.  earlier it was working normally.

  • How to get the itunes with those 3 colored buttons on top left corner ????ner ???

    Please help [humble request] ----
    I have 3 problems can u please help me out --
    1) How to get the itunes with the 3 colored buttons (i'm new to apple ,just 8 days so i dont know much stuff) on top left corner ,i've downloaded thrice from apple's site directly i everytime got the same sort of itunes with 'File' ,'Edit' ,'View' ,'Controls' ,'Store' ,'Adanced' ,'Help' on the top ,and also whenever i open the itunes store (in this itunes) only the app store opens ,now music albums ,movies ,tv shows nothing !!
    2) I dont know how to import video files from the computer to itunes
    3)i bought an app [fifa 11] ,n downloaded another 1 [contract killer] {ive deleted them and downloaded them thrice ,and they dont sync to my itouch it shows error (0xE800004C)
    Please please please help me im getting worried and frustrated
    please help me out with this

    but illaass
    i asked 2 of my frnds both of them have windows n not mac ,both of them are sayin dat they have the coloured buttons one , and i asked them dat how to access the itunes music store they said that when they kliked d itunes store option in the left side a screen appears where 6 -7 categories are there which are music store ,app store ,podcasts ,movies ,tv shows etc . bt when i open it it only shows d app store ,and on the bar only 4 options are ther the home icon , app store , podcasts and itunes u ,and when i klik movies ,tv shows on the left side ,there is an option "browse for movies in the itunes store" i klik it and only the app store opens and nothing else .
    and thanks now i know how to import videos
    and sigma 1337 ,
    ive downloaded the apps 4 -5 times now , still d same error mssg it comes like dis :-
    " Some of the apps in your iTunes library were not installed on the ipod "Shomik's ipod" because one or more errors occurred "
    please help me  im gettin frustrated

  • How to get the database owner name in T-SQL script

    Hello, All!
    I want to get the database ower name (in format DOMAIN\user) by through T-SQL script. But SELECT * FROM sys.databases returns only owner_sid.
    Please show me a way - how to get the owner name, if you have only owner_sid. Or, may be, somebody know another way ?
    Andy Mishechkin

    SELECT suser_sname( owner_sid ), * FROM sys.databases
    http://www.t-sql.ru

  • How to get the Database Type quan in my internal table?

    Hi, I have the following problem, I have a Database Table with a column foo (QUAN with length 15 and 3 dec). Now I want to read this field into a Internal Table and the corrospoding field is:
    foo(19) TYPE C,
    But this is not working I'm getting the dump:
    DBIF_RSQL_INVALID_RSQL
    CX_SY_OPEN_SQL_DB
    What is the correct abap type in my structure to put this QUAN in my internal table?

    Hi Michael,
         when you know your data base field name then u can define your variable f00 of your db field type like
         foo type <dbtabname>-<fieldname)  -----ex -- j_1iexcdtl-menge
         or define foo as packed no
         data : foo(19) type p decimals 3.
    Regards

  • How to get the database table field names from program

    Hi,
    Can any one tell me,whether any function module is there which can get the table field name and its details ,when we pass database table name to it.
    Thanks in Advance
    <REMOVED BY MODERATOR>
    Regards
    Shibin
    Edited by: Alvaro Tejada Galindo on Feb 14, 2008 12:41 PM

    Hi,
    DD02L Table contains the SAP Tables.
    DD02T Table contains the SAP Table Texts.
    DD01L Table contains the Domains
    DD01T Table contains the Domain Texts.
    DD03L Table contains the Table Fields.
    DD03T Table contains the Table Field Texts. (Language Dependent)
    DD04L Table contains the Data Elements.
    DD04T Table contains the Data Element Texts.
    DD05s Table contains the Foreign Key Fields
    last words with L and T only. L->Database Fetch T-> Text
    For ur question use table DD03L or DD03T.
    Regards,
    Chandru

  • How to get the Database table behind condition records

    Hello All
    In transaction VK13, after giving condition type, I can select sales document.
    For a given Sales Document number, there are several conditions.
    How can i extract all the conditions for a given sales document?
    I am coding a report for this. In which database table can i get the condition between sales document number & different conditions attached to it?
    On the screen, i can see that the fields are from the structure KOMG. What is the corresponding table?
    Thanks
    Chandra Sekhar

    Hi,
    corersponding tables will be konp , a771,a511,a564
    here i am providing you sample query related to it
    { -Get the Territory list price YPR0
        SELECT vkorgau
               zzland1_ag
               zzmatgrade
               a511~kfrst
               datbi
               datab
               kbetr
          INTO TABLE it_list1
          FROM a511
          JOIN konp
            ON a511knumh = konpknumh
         WHERE a511~kappl = 'V'
           AND a511~kschl = 'YPR0'
           AND vkorgau = '5000'
           AND zzland1_ag = v_land1
           AND loevm_ko <> 'X'.}
    Thanks & Regards,
    Sateesh.
    Edited by: sateesh kumar on Nov 12, 2009 12:59 PM

  • How to get the database value without submitting the jsp page

    Hi,
    I have a form that has many fields (textbox/listbox). when user enter/change a value in the first textbox, I need to pass this value to the database to check whether it exist and get the other values to be displayed to other fields in that form (i cannot get the javascript value to be pass to jsp without reload/refresh/submit. But, I need to get the user entered value, so I thought of hidden popup, iframe, etc but not sure how I could apply and which best suit this case). If I submit the page then I can easily get the value thru 'request.getParameter("fieldname") but cannot use this because I cannot submit the page.
    Pls help and possible provide me with the sample coding
    Thanks

    The best way for you is surely AJAX. But there is another way to stay compatible with older browsers:
    Since the default method a browser supposed to get data is refresh, there is nothing unnatural in it. Browsers are optimized to refreshes, like cached images, etc..
    So for these step-by-step things, you need to roll forward your data from page to page, and make the page to respond according the data it actually have. This can be easily achived with type="hidden" input fields in a form: the user will send you back all the data. Optionally you may show him the data you already have as visible text too.
    A more generalised way to "pull" the data: you make a whole page you include every time you need an additional data. This page will receive 2 parameters from where you've included it. This 2 parameters are each indexed arrays with the datas you have to pull in (here the default value), and you need to push forward. Optionally there is a 3rd parameter, the url it have to return (as the form's action property).
    And for them who now say that it would me more culture way to store this data in the session: Beware! Common mistake: Sessions are to store data about the user itself, not the datas for the next page! You never know what will be the next page! The user click some backward button and refresh button, and depending on your script, it may go stupid! Ok, not all the codes, but I've seen some. It's ok to store a sent file (fx. image) on the server, but always think the evil refresh and back buttons!

  • URGENT: how to get the database error message into application?

    Hi, pls give some idea:
    For example, the database is MS Access. When insertion failed, the getMessage() method of SQLException will print "General error", while the log file created by ODBC will be "[MICROSOFT][ODBC DRIVER]column ID no found in student table"(...just a example).
    So, how to get this message in our application?

    instead of using the getMessage method, have you tried something like this:
             try {
             } catch (Throwable t1) {
                System.out.println(t1.toString());
             }If that still doesn't work, you can always redirect the log entries into a textarea but then everything that appears in the log file will be redirected!
    ;o)
    V.V.

  • Select Count(*) from Sample_table - how to get the count using JDBC?

    Hi All,
    It would be glad if anyone could help me with this. The problem is that I have to get the 'count' of records selected from a arbitrary table say, 'sample_table'. Is that possible to form the SQL in JDBC as
    Select Count(*) from Sample_table
    and get the value of the count? If yes, how?
    Thanks in advance
    Prabz

    stmt = con.createStatement();
    ResultSet recordcnt_rs = stmt.executeQuery("Select Count (*) as record_ctr From Sample_table");
    recordcnt_rs.next();     
    record_ctr = recordcnt_rs.getInt("record_ctr");
    hope this helps.

  • How to get the Database Driver list

    Hi... I want to know that particular database driver is registered or not in windows.. how can i get this info.
    And I want to get the list of all the database drivers registered in windows..
    Can anybody help me..

    dcminter wrote:
    Well, seeing as how none of them are registered, until your program registers them, simply keep a list.That's not actually true. If the JAR is in the classpath then a JDBC4 driver will use the service provider hooks to register itself.
    When first loaded. Which is unlikely to happen until you explicitly load it.
    Being on the classpath doesn't mean the JVM will actually do anything with a class. Either an application will have to initiate some action or it will have to be initiated by the manifest of the jar (and I'm not sure that will actually do anything until a class from that jar is actually required to be loaded).

  • How to get the Database size?

    Hai Friends,
    I have created a Z Table with 100 fields. i want to check the database size after uploading the data. How can i do this?. That is, after uploading the first entry i want to know the size and again i want to upload 5 more entries and to check the growth.
    Where can i see this?. i have checked in DB02 but even after data upload i didnt see the size. kindly explain me the process.
    Thanks..................

    Hi,
    In the Go to Menu then Check the Number of entries to track your current set of entries.
    For DB Size  check Technical Settings . Tab Logical Settings parameters the Data class and Size category can give you how much data the table can hold.
    Thanks,
    Anita

  • How to get the connection with PM in sequencefactory?

    In SequenceFactory interface the following method
    public long getNext(Class cls, Connector connector)
    is to get the next sequence number, and one can use the connector to get a
    new connection, but at most time, when the kodo call this method, there
    must a PM exist, so if I want to use the connection with the exist PM, not
    a new connection, how can I get to it!

    Maguohai-
    You can't do this with datastore identity, but you could use application
    identity, and have the id assigned wherever use want, using SQL executed
    via a Connection obtained in the way described at:
    http://docs.solarmetric.com/manual.html#feature_sql_connection_access
    In article <bc0n3c$n9l$[email protected]>, maguohai wrote:
    Yes, you are right, but if generate the sequence need not transaction(for
    example using DBMS SEQUENCE OBJECT to get the sequence), and I don't want
    one application contains two connection at the same time. Is the any way I
    can do?
    Marc Prud'hommeaux wrote:
    Maguohai-
    The SequenceFactory implementation should use a second Connection in order
    to manipulate sequence numbers, since the transactional boundry for
    the sequence increment should not be bound to the transactional boundry of
    the PersistenceManager.
    In article <bbu83a$knd$[email protected]>, maguohai wrote:
    In SequenceFactory interface the following method
    public long getNext(Class cls, Connector connector)
    is to get the next sequence number, and one can use the connector to get a
    new connection, but at most time, when the kodo call this method, there
    must a PM exist, so if I want to use the connection with the exist PM, not
    a new connection, how can I get to it!
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

Maybe you are looking for

  • Traffic light in Excell addin ??

    Hi, can we achive Traffic light in Excell addin without webanalyzer? Thanks

  • Problem importing photos from iPhoto

    I want to import photos from iPhoto. I only want to import photos from two or three albums in iPhoto on my iMac. When I plug in the iPad Air, I choose sync from selected albums. I choose the albums I want to import from and click on "sync" or "apply"

  • Calling WD Application through Microsoft SharePoint.

    Hi Experts, I want to call some WD Application from MS SharePoint. Can it be possible to call WD Application from MS Share Point if yes then please let me know the steps. Thanks in Advance. Thanks, Satya

  • Output to 2 decimal places

    Hi there, Got a small problem the output's are coming out like this 155.5 and i need them to come put like this 155.50 <cfparam name="FORM.twin" type="string" default="1" /> <cfquery name="twin" datasource="strand"> SELECT * FROM hotel_rooms WHERE ho

  • Station Options - Interactiv​e Mode

    Hello, - Just wondering whether it is possible to set the "Interactive Mode" properties programatically. I would like to programatically set the Interactive Mode properties when the operator interface starts up. (These options can be found in the Sta