How to determine the field size

I am going to make a multiplatform application that hopefully
will run on linux and windows 2000.If the os is 2000, then I will use
vb.net/aspx else I'll use java servlets. I make the connection
to the web server ( through HTTP) not directly to database server.
So, the resultset will be stored in the String object. The columns
will be separated by delimeter. Our problem is how to determine
the size and type of the fields of mssql,oracle and postgres database
so that we can include it in the String object.
Ex.
String sResultSet=new String();
ResultSet rs=statement.executeQuery(sSQL);
while(rs.next()){
sResultset=sResultSet + rs.getString(field1) + "||" + rs.getString(field2) + "||";
vertical bars acts as delimeter
supposedly this is the code:
sResultset=sResultSet + rs.getString(field1) +"_" + rs.getFieldType() + "_"+
rs.getFieldSize() + "||" + rs.getString(field2) +"_" + rs.getFieldType() + "_"+
rs.getFieldSize() + "||";
supposedly this is the code if rs.getFieldType() and rs.getFieldSize() methods are existing
Anyone can give me an idea how to get the field type and field size of the database?
thanks in advance

Yes, but I dont know how to do it.
Can you give me an example of using it.
Thanks in advance

Similar Messages

  • How to determine the proper size for Oracle 8i Data Base Objects

    Hi,
    I'm working on an Oracle 8i Data base. I'd like to know how to determine the proper size for the Data Base objects such as tables, datafiles, tablespaces...
    Thanks.

    Start with the docs.
    http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76956/schema.htm#949
    Best Regards
    Krystian Zieja / mob

  • How to determine the database size corresponding to the nber records in DSO

    Hi Colleagues,
    I would like to determine the database size corresponding to my new BI project.
    I know the number of records uploaded in the DSO from the source system for the intialization phase.
    How can I deduct the database size / disk size corresponding to the number of record uploaded ?
    Thanks,

    Hi Ram,
    I am with SAP BI Release SAPKW70019
    I do not have the option Single Table analysis -
    I have in DB02 or ST04 the following options.
    *- Space*
    -- space overview
    ->database
    --overview
    ->users
    --overview
    --detailed analysis
    -> tablespaces
    --overview
    --detailed analysis
    -> segments
    --overview
    --Detailed analysis
    --Detailed Analysis Aggregated
    -> Additional Functions
    --Collector Logs
    --BW Analysis
    Where should I go through ?
    Thanks

  • Tablespace allocation type system  how oracle determines the extent size

    HI
    It may be silly question but the I have to ask and get some knowdge
    Suppose tablespace allocation_type is system then how oracle determins the inital extent and max extent size?

    Was this tablespace converted to locally managed from an existing tablespace? If so, the existing extents still exist after the conversion. Also depending on the Oracle version and maybe platform the pct_increase parameter is still honored after the conversion which can lead to odd sizes. The current value of this parameter may not be the value that was in effect when extents were allocated.
    Also Oracle enhanced the logic to not leave odd sized extents unused so that if by rights the system should take a 64K extent but there is a 56K extent available (perhaps at the end of a file) it can be used to fill the extent request.
    HTH -- Mark D Powell --

  • How to determine the maximum size of JFrame?

    I am using JDK1.2 to develop an application. I have
    a problem to handle the maximum size of of JFrame.
    If the user clicks the maximum icon or double-clicks
    the title bar from the JFrame, the JFrame becomes
    maximum. How can I determine the state of maximization? I need to bring different views if the
    JFrame is maximum or minimum. I knew JDK1.4 can
    handle this problem. Or using JNI, either. Does
    anyone know other ways to handle this?
    Thanks,
    Peter

    So that you won't have to wait forever:
    Sorry, pal, the only way is JNI. I researched this earlier for 1.2, but can't find it right now in the database. They finally added it to 1.4.
    Good luck.

  • How to set the field size in rule file.

    i have to map total 30 fields in a rule file while by default it allows only 20 fields. so how can we set the fields as per our need?

    Hi Dharmendra Ojha,
    Essbase rule file does not constrain you with only 20 fileds.
    When you click on 'create a rule file', by default it ll show you 20 fileds .But , when you open a data file ( in your case , you data file has 30 columns i.e 30 fields) in the data prep editor , you ll see all 30 fileds .
    So ,you have to do nothing to increase the filed count , rule file will automatically show all fields .
    Revert back for further clarity
    Sandeep Reddy Enti
    HCC
    http://analytiks.blogspot.com

  • How to change the field size cache/buffer in a query

    I query a field from sql developer, the field is cases_history, it resides in a data mart in the global network of our company.
    this field is big in size, it stores logs in a sequential way, so field size increases a lot.
    when i query it and try a "single record view" the field is cut off and can´t see all of its content..
    WHAT I THOUGHT AND IT DOESN´T APPLY
    1. maybe in database connections in the system tab, I go to the oracle data mart that i am interested in and change buffer and cache
    but it doesn´t work, sql developer keeps showing part of the field
    2. maybe it was then the buffer size in sql developer, so I change it, but no luck
    WHAT IS THE PROBLEM HERE?
    MANY THANKS IN ADVANCE

    many thanks in advance for your help,
    1.the data type in the remote oracle data mart is VARCHAR2(4000)
    2.editing with the pencil cuts off at somepoint (which is the same line and last word)
    3.this is the query I write
    ||select case_history from wfm_case where case_id='xxxx'||
    this is to test if I can get a long case_history, which we know it is because it is fully accessible through a web solution to revise cases.
    PLS note. I have a tns connection which is of the following type :
    (in data sources (odbc) -- system dsn -- oracle odbc driver configuration ...oracle .. buffer size =9000 , cache buffer size =4000 and FORCE SQL_WCHAR SUPPORT is enabled
    many thanks,
    Jordi.

  • How to determine maximum field size?

    Hello!
    Here's my problem...
    I have a rather large CSV file which I have loaded into Numbers, but now i need to work out what the maximum size of each field is.
    There are far too many rows for me to just look through the CSV file (it's got a few hundred thousand lines in it), so i was hoping there was an easy way for Numbers to just tell me what the maximum size of each column is -- maybe some kind of formula that i can put at the end of each column.
    just to be clear, i don't need the maximum value in each column, i need the maximum character length...
    thanks for your help (and a happy new year!)

    Craig,
    That's an awful job for Numbers. Numbers 2 won't accommodate that many rows, and Numbers 3 I'm not sure about, but in any case it will be very slow. The general belief is that Numbers 3 is faster than Numbers 2, but in my experience it's like a race between a turtle and a slug. This would be a better job for a little BASIC routine, the sort of thing I can remember doing easily "back in the day", but which I wouldn't know where to begin now with the tools I know about in the Mac environment.
    I think LibreOffice might handle it - no promises. The brute force way would be to have a second table the same size as the first and filled with the expression: =LEN(cellAddress), where cell address is a reference to A1 in the input table, and so forth. The expression =MAX(full range of length calculations table) should give you the largest entry length.
    Jerry

  • How to increase the field size in modules

    Dear Oracle Team,
    When we add some items in reason codes from the dictionary, it has certain limit in reason code and title. So I can increase those field size to add bigger text for title names.
    I think it also applicable for the fields in other modules also. Looking your valuable support.
    Thanks & Regards,
    Sheik

    1.  Once you add a custom field to your database, it would be made available to either your reports (BI) or your layouts in PCM.
    2.  When you create the custom field, you would specify the field length/type/properties.  (i.e. "Char" field with 120 char field length)  If you set this to one value when you create (say 120 char) and want to CHANGE it to 140 characters, you cannot do this without deleting and re-creating the custom field.  I did check 14.0.3 and this continues in this version as well.
    2a.  Best practice is to be generous in your field sizes to avoid needing to change it later.
    As I mentioned before, any default fields in the database are fixed to their set properties and the only way to change them is to submit an SR to Oracle to request the change.

  • How to determine the Memory size of my computer?

    I need to find a way to determine how much computer RAM i have left. I was suggested to use System class methods like "Runtime.getRuntime().getFreeMemory()", and I need to determine how much Memory I need to use when I launch Java VM with Xmx option.
    I wonder if there is more detail I need to know at this moment? If this question is more suitable in Java VM forum, please let me know.

    This is a slightly messed version of the one in the J2D Demo, use JFrame.add(new MemoryMonitor());
    I'm not entirely sure if it'll work straight off since I messed with it but it should, all the memory stuff is hidden away there somewhere even if it won't.
    Shish
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.BufferedImage;
    import java.awt.geom.Line2D;
    import java.awt.geom.Rectangle2D;
    import java.util.Date;
    import javax.swing.*;
    import javax.swing.border.EtchedBorder;
    import javax.swing.border.TitledBorder;
    public class MemoryMonitor extends JPanel {
        static JCheckBox dateStampCB = new JCheckBox("Output Date Stamp");
        public Surface surf;
        JPanel controls;
        boolean doControls;
        JTextField tf;
        public MemoryMonitor() {
         note=n;
            setLayout(new BorderLayout());
            setBorder(new TitledBorder(new EtchedBorder(), "Memory Monitor"));
            add(surf = new Surface());
            controls = new JPanel();
            controls.setPreferredSize(new Dimension(135,80));
            Font font = new Font("serif", Font.PLAIN, 10);
            JLabel label = new JLabel("Sample Rate");
            label.setFont(font);
            label.setForeground(Color.black);
            controls.add(label);
            tf = new JTextField("1000");
            tf.setPreferredSize(new Dimension(45,20));
            controls.add(tf);
            controls.add(label = new JLabel("ms"));
            label.setFont(font);
            label.setForeground(Color.black);
            controls.add(dateStampCB);
            dateStampCB.setFont(font);
            addMouseListener(new MouseAdapter() {
                public void mouseClicked(MouseEvent e) {
                   removeAll();
                   if ((doControls = !doControls)) {
                       surf.stop();
                       add(controls);
                   } else {
                       try {
                           surf.sleepAmount = Long.parseLong(tf.getText().trim());
                       } catch (Exception ex) {note.alert(ex);}
                       surf.start();
                       add(surf);
                   validate();
                   repaint();
        public void start() {
         surf.start();
        public class Surface extends JPanel implements Runnable {
            public Thread thread;
            public long sleepAmount = 1000;
            private int w, h;
            private BufferedImage bimg;
            private Graphics2D big;
            private Font font = new Font("Times New Roman", Font.PLAIN, 11);
            private Runtime r = Runtime.getRuntime();
            private int columnInc;
            private int pts[];
            private int ptNum;
            private int ascent, descent;
            private float freeMemory, totalMemory;
            private Rectangle graphOutlineRect = new Rectangle();
            private Rectangle2D mfRect = new Rectangle2D.Float();
            private Rectangle2D muRect = new Rectangle2D.Float();
            private Line2D graphLine = new Line2D.Float();
            private Color graphColor = new Color(46, 139, 87);
            private Color mfColor = new Color(0, 100, 0);
            private String usedStr;
            public Surface() {
                setBackground(Color.black);
                addMouseListener(new MouseAdapter() {
                    public void mouseClicked(MouseEvent e) {
                        if (thread == null) start(); else stop();
            public Dimension getMinimumSize() {
                return getPreferredSize();
            public Dimension getMaximumSize() {
                return getPreferredSize();
            public Dimension getPreferredSize() {
                return new Dimension(135,80);
            public void paint(Graphics g) {
                if (big == null) {
                    return;
                big.setBackground(getBackground());
                big.clearRect(0,0,w,h);
                float freeMemory = (float) r.freeMemory();
                float totalMemory = (float) r.totalMemory();
                // .. Draw allocated and used strings ..
                big.setColor(Color.green);
                big.drawString(String.valueOf((int) totalMemory/1024) + "K allocated",  4.0f, (float) ascent+0.5f);
                usedStr = String.valueOf(((int) (totalMemory - freeMemory))/1024)
                    + "K used";
                big.drawString(usedStr, 4, h-descent);
                // Calculate remaining size
                float ssH = ascent + descent;
                float remainingHeight = (float) (h - (ssH*2) - 0.5f);
                float blockHeight = remainingHeight/10;
                float blockWidth = 20.0f;
                float remainingWidth = (float) (w - blockWidth - 10);
                // .. Memory Free ..
                big.setColor(mfColor);
                int MemUsage = (int) ((freeMemory / totalMemory) * 10);
                int i = 0;
                for ( ; i < MemUsage ; i++) {
                    mfRect.setRect(5,(float) ssH+i*blockHeight,
                                    blockWidth,(float) blockHeight-1);
                    big.fill(mfRect);
                // .. Memory Used ..
                big.setColor(Color.green);
                for ( ; i < 10; i++)  {
                    muRect.setRect(5,(float) ssH+i*blockHeight,
                                    blockWidth,(float) blockHeight-1);
                    big.fill(muRect);
                // .. Draw History Graph ..
                big.setColor(graphColor);
                int graphX = 30;
                int graphY = (int) ssH;
                int graphW = w - graphX - 5;
                int graphH = (int) remainingHeight;
                graphOutlineRect.setRect(graphX, graphY, graphW, graphH);
                big.draw(graphOutlineRect);
                int graphRow = graphH/10;
                // .. Draw row ..
                for (int j = graphY; j <= graphH+graphY; j += graphRow) {
                    graphLine.setLine(graphX,j,graphX+graphW,j);
                    big.draw(graphLine);
                // .. Draw animated column movement ..
                int graphColumn = graphW/15;
                if (columnInc == 0) {
                    columnInc = graphColumn;
                for (int j = graphX+columnInc; j < graphW+graphX; j+=graphColumn) {
                    graphLine.setLine(j,graphY,j,graphY+graphH);
                    big.draw(graphLine);
                --columnInc;
                if (pts == null) {
                    pts = new int[graphW];
                    ptNum = 0;
                } else if (pts.length != graphW) {
                    int tmp[] = null;
                    if (ptNum < graphW) {    
                        tmp = new int[ptNum];
                        System.arraycopy(pts, 0, tmp, 0, tmp.length);
                    } else {       
                        tmp = new int[graphW];
                        System.arraycopy(pts, pts.length-tmp.length, tmp, 0, tmp.length);
                        ptNum = tmp.length - 2;
                    pts = new int[graphW];
                    System.arraycopy(tmp, 0, pts, 0, tmp.length);
                } else {
                    big.setColor(Color.yellow);
                    pts[ptNum] = (int)(graphY+graphH*(freeMemory/totalMemory));
                    for (int j=graphX+graphW-ptNum, k=0;k < ptNum; k++, j++) {
                        if (k != 0) {
                            if (pts[k] != pts[k-1]) {
                                big.drawLine(j-1, pts[k-1], j, pts[k]);
                            } else {
                                big.fillRect(j, pts[k], 1, 1);
                    if (ptNum+2 == pts.length) {
                        // throw out oldest point
                        for (int j = 1;j < ptNum; j++) {
                            pts[j-1] = pts[j];
                        --ptNum;
                    } else {
                        ptNum++;
                g.drawImage(bimg, 0, 0, this);
            public void start() {
                thread = new Thread(this);
                thread.setPriority(Thread.MIN_PRIORITY);
                thread.setName("MemoryMonitor");
                thread.start();
            public synchronized void stop() {
                thread = null;
                notify();
            public void run() {
                Thread me = Thread.currentThread();
                while (thread == me && !isShowing() || getSize().width == 0) {
                    try {
                        thread.sleep(500);
                    } catch (InterruptedException e) { return; }
                while (thread == me && isShowing()) {
                    Dimension d = getSize();
                    if (d.width != w || d.height != h) {
                        w = d.width;
                        h = d.height;
                        bimg = (BufferedImage) createImage(w, h);
                        big = bimg.createGraphics();
                        big.setFont(font);
                        FontMetrics fm = big.getFontMetrics(font);
                        ascent = (int) fm.getAscent();
                        descent = (int) fm.getDescent();
                    repaint();
                    try {
                        thread.sleep(sleepAmount);
                    } catch (InterruptedException e) { break; }
                    if (MemoryMonitor.dateStampCB.isSelected()) {
                         System.out.println(new Date().toString() + " " + usedStr);
                thread = null;
    public static void main(String s[]) {
            final MemoryMonitor demo = new MemoryMonitor();
            WindowListener l = new WindowAdapter() {
                public void windowClosing(WindowEvent e) {System.exit(0);}
                public void windowDeiconified(WindowEvent e) { demo.surf.start(); }
                public void windowIconified(WindowEvent e) { demo.surf.stop(); }
            JFrame f = new JFrame("Java2D Demo - MemoryMonitor");
            f.addWindowListener(l);
            f.getContentPane().add("Center", demo);
            f.pack();
            f.setSize(new Dimension(200,200));
            f.setVisible(true);
            demo.surf.start();

  • How do you determine the optimal size for Mozilla Firefox?

    How do you determine the optimal size for cache in Mozilla
    Firefox? I am using Firefox 7.0.1 on a 64-bit Windows 7 Ultimate operating system with 3GB RAM and 300 GB hard drive, but I have other computers running Windows XP. If the answer doesn't apply to all current versions of Firefox on all supported Windows operating systems, please explain the differences. Is there a formula for calculating the best cache size?

    I found that the best idea is to let Firefox decide that itself.

  • How to determine the scratch disc size?

    hello,
    once i was reading an adobe pdf "How to get better performance in photoshop cs5" - that was in 2009 or 2010, and may be outdated, but there was a calculation method
    to determine the size of a scratch disc. (similar calculation see below, if i can remember right)
    i am asking myself, how can i determine the correct size of an external SSD-scratch disc, only used by photoshop (completely empty):
    should i buy a 128GB or 256GB or 512GB SSD which is only reserved for photoshop?
    basic question 1 : i guess i should avoid to set the internal SSD as photoshop scratch disc, as it slows down everything?
    basic question 2 : in sense of maximum performance: better buy an external USB3.0 or thunderbolt SSD? will photoshop really use the extra thunderbolt speed when swapping data?
    secondary question:
    can i calculate the size regarding my daily working habits?
    i am mainly working like this:
    - with my imac 27" late 2013 with 32GB RAM and 256 GB internal pci-e SSD (800 MB/sec), which will stay always half empty for performance reasons.
    - OSX 10.8 mountain lion and 10.9 mavericks soon
    - photoshop cs5, cs6 and cc (always without extended)
    - 8bit and 16bit mode
    - only RGB
    - with latest phocus/Hasselblad and canon RAW Files which produce a basic .psb document at ...
    - 10.000 x 7000 px at 300dpi
    - with average 10 - 40 main image layers and 20-50 adjustement layers (try to reduce that in 16bit)
    - .psb file is 2-20 GB big (file in finder)
    - 16bit file compression is off, when saving .psb files (faster handling)
    -  set photoshop to 70% ram usage (from 32GB RAM)
    i wonder how to calculate ?
    for example:
    10.000 x 7000 px at 300dpi needs for one image layer at 16bit: 2GB RAM in photoshop cs6 or cc (just as a number), this may be wrong
    so lets take 2GB RAM and multiply with 10 image layers in my .psb file (16bit) = 20 GB RAM, and multiply with 20 adjustment layers (guess they need less ram, for one lets say 500MB) = 20GB + 10GB = this 16bit .psb layer file would need 30GB RAM, so when i have 32GB in my imac, i set cs6 or cc to 70% ram usage, it misses at least round 8-10GB RAM > can i guess that photoshop would swap these 8GB onto my scratch disc? or do i miss something important in my thinking?
    tricky thinking
    thanks for help

    station_two wrote:
    The rule of thumb I follow says to figure on 50 to 100 times the size of your largest file ever multiplied by the number of files you have open.  I have seen the scratch file exceed 300 GB once, an admittedly rare occurrence, but it often exceeds 200 GB when stitching large panoramas and the like.
    As an example—and stressing that I'm aware that others have even more scratch space than I do—I keep two dedicated, physically separate hard drives as my primary and secondary Photoshop scratch disks and a lot of GB free on my boot drive for the OS.  I also have 16 GB of RAM installed.
    Additionally, if you only have a single HD, i.e. your boot drive, you'd need it to be large enough to accommodate both the swap files of the OS as well as Photoshop's scratch.
    - i dont use HDD anymore only SSDs, both internal and external
    - i set history state to only 5 or 6, to improve performance
    - i set cache size to 4 and tiles to "big and flat" with 1028kb (there is no "big and much layers" option)
    - is this still the rule of thumb? i read it in 2009 , too, guess it was outdated, as cs6 and cc have improved codes in terms of performance?
    - if you say "50 to 100 times the size of your largest file ever multiplied by the number of files you have open.":
    i will not open more than one document at same time to prevent performance lags, so lets calc like: dokument size in finder (you mean in finder or doc. size shown in photoshop?) = e.g. 5GB x 100 = 500GB, so my external scratch disc SSD, i would buy now, should be at least 500GB, USB 3.0 or thunderbolt ... maybe better thunderbolt, yes? with usb 3.0 i could gain 300MB/sec if thats enough for photoshop?
    thanks

  • In InDesign, how does one determine the pixel size of a text box? Specifically, we need to write text to specifications of 600 pixel width, and have no idea a) how to scale a text box to specific pixel width, b) how to

    This may be a basic question... but in InDesign, how does one determine the pixel size of a text box? Specifically, we need to write text to specifications of 600 pixel width, and have no idea a) how to scale a text box to specific pixel width, b) how to determine what word count we can fit in, and c) how to do it in a table? Thanks!

    Set your ruler increments to pixels Preferences>Units & Increments. You can fill the text box with placeholder text Type>Fill with Placeholder text and get a word count from the Info panel with Show Options turned on from the flyout.
    From the Transform panel you can set a text box's width and height

  • How to determine the size of the JVM process?

    Hi,
    How to determine the total process size of the JVM process (that includes Heap, Non Heap and Native memory)?
    Is there any command to obtain this value on Solaris (for Sun JVM)?
    I refer the process size to http://middlewaremagic.com/weblogic/wp-content/uploads/2010/11/Java_Heap_Diagram_12.jpg) here.
    Many thanks for your help in advance!

    Hi,
    Make sure that Total Heap + Native memory will be consider as total Memory.
    That means in 32 bit you will have only at most 4 GB for process + additional 2 GB for OS.
    So let assume if you have 4GM RAM then out of the 4GB you can allocate 2GB as Heap and 512m as Perm in case of Hot spot and remaining will be consider as Native memory.
    But in case of 64 bit will change you will have good amount of the memory so you can use plenty of Heap and Perm size.
    Still if you have query let me know.
    Regards,
    Kal

  • HT1222 how do i determine the file size of each download before i download it?

    How do i determine the file size of a down load before i download it?

    I have checked the update page and even checked more and can find no reference to file size.  I'm using a hotspot and some of the downloads cause me to go over my limit and incur extra charges.  I apperciate your help.

Maybe you are looking for

  • IPod Touch will not turn on unattached, Restore error 1604/1611

    Up through yesterday my iPod touch was working fine. However, after disconnecting it from syncing yesterday, it would not turn on. I have tried the manual reboot without success. The iPod will not turn on by just using the external power buttons. It

  • Camera raw not working on photoshop elements 8

    I have tried installing camera raw 6.2 for photoshop elements 8 so I can open RAW image files, I have done exactly as the instructions said and I still encounter the error of "cannot open ___ because it is the wrong type of file"

  • Full-resolution photos.

    I would like to have the option in iTunes to disable optimization when syncing photos to my iPod Touch so I can view them in full-resolution. How can I suggest this to Apple?

  • Convert number Date to real

    I have a column that stores Date as a number, 19490128 YYYYMMDD I need to covert that to a Real Date and then find out current age of person, how would I do that ? I used to know how, but I forgot :- ) Please help.. 10G

  • "not enough disk space"...  WHAT?????

    Try to DL files using Safari. It claims there's not enough disk space. I've got 129GB of 148GB still available. Changed DL location. No change. Copied files from another computer via LAN - took the file with no problem - so NO space issue. Even insta