Problem about F5 and F6 keys

I was trying to screenshot but sth wrong happen to my backlit F5 and F6 keys and I cant use it ...like i might accidently press command+shift+f5 ...and somehow the backlit keys stop working...  , what should I do? Thank you

Try a SMC reset.
http://support.apple.com/kb/HT3964
Ciao.

Similar Messages

  • A very surprise problem about JDBC and connection pool

    I occur a very problem about JDBC and connection pool on Weblogic Platform
    8.1.
    There is a table in Oracle
    Table
    Name: t1
    id varchar2(5);
    content clob;
    id is primary key.
    If I use a connection pool to connect to Oracle,like following program:
    InitialContext ic = new InitialContext();
    DataSource ds = (DataSource) ic.lookup("cgOracleDataSource");
    con = ds.getConnection();
    then following program will throw a ClassCastException
    String sql = "select content from t1 where id = ?";
    PreparedStatement pst = con.prepareStatement(sql);
    pst.setString(1,"001");
    oracle.sql.CLOB clob = (oralce.sql.CLOB)rs.getClob("content") //this
    statement will throw ClassCastException
    but if I use JNDI to connect to Oracle,like following program, then those
    program above is ok
    private String dbdriver="oracle.jdbc.driver.OracleDriver";
    private String dburl="jdbc:oracle:thin:@192.168.7.148:1521:ep";
    private String username="ep";
    private String password="epuser";
    Class.forName(dbdriver);
    conn = DriverManager.getConnection(dburl, username, password);
    conn.setAutoCommit(false);
    On the contrary, if I use JNDI to connect to Oracle, following program will
    throw ClassCastException
    weblogic.jdbc.vendor.oracle.OracleThinClob clob =
    (weblogic.jdbc.vendor.oracle.OracleThinClob)rs.getClob("content");
    but it is fine if I use connection pool to connect to Oracle.
    I am confused this problem, who can tell me why?
    Daniel

    When you are getting connection using datasource lookup from weblogic
    connection pool, this connection is internally wrapped and hence you have to
    cast it to weblogic.jdbc.vendor.oracle.OracleThinClob which you do and so it
    works.
    But when you get connection by loading driver straight, you are getting naked
    oracle connection. In this case when you cast it to oracle.sql.Clob it works,
    as you have seen in your test case.
    I hope this explains what is going on with your code.
    Thanks,
    Mitesh
    Daniel wrote:
    I occur a very problem about JDBC and connection pool on Weblogic Platform
    8.1.
    There is a table in Oracle
    Table
    Name: t1
    id varchar2(5);
    content clob;
    id is primary key.
    If I use a connection pool to connect to Oracle,like following program:
    InitialContext ic = new InitialContext();
    DataSource ds = (DataSource) ic.lookup("cgOracleDataSource");
    con = ds.getConnection();
    then following program will throw a ClassCastException
    String sql = "select content from t1 where id = ?";
    PreparedStatement pst = con.prepareStatement(sql);
    pst.setString(1,"001");
    oracle.sql.CLOB clob = (oralce.sql.CLOB)rs.getClob("content") //this
    statement will throw ClassCastException
    but if I use JNDI to connect to Oracle,like following program, then those
    program above is ok
    private String dbdriver="oracle.jdbc.driver.OracleDriver";
    private String dburl="jdbc:oracle:thin:@192.168.7.148:1521:ep";
    private String username="ep";
    private String password="epuser";
    Class.forName(dbdriver);
    conn = DriverManager.getConnection(dburl, username, password);
    conn.setAutoCommit(false);
    On the contrary, if I use JNDI to connect to Oracle, following program will
    throw ClassCastException
    weblogic.jdbc.vendor.oracle.OracleThinClob clob =
    (weblogic.jdbc.vendor.oracle.OracleThinClob)rs.getClob("content");
    but it is fine if I use connection pool to connect to Oracle.
    I am confused this problem, who can tell me why?
    Daniel

  • Hello apple I have the problem with my iPhone and my friends have this problem too. My iPhone have the problem about calling and answer the call. When I use my iPhone to call I can't hear anything from my iPhone but the person that I call can answer it bu

    Hello apple
    I have the problem with my iPhone and my friends have this problem too.
    My iPhone have the problem about calling and answer the call. When I use my iPhone to call I can't hear anything from my iPhone but the person that I call can answer it but when answer both of us can't hear anything and when I put my iPhone to my face the screen is still on and when I quit the phone application and open it again it will automatic call my recent call. And when my friends call me my iPhone didn't show anything even the missed call I'm only know that I missed the call from messages from carrier. Please check these problem I restored my iPhone for 4 time now in this week. I lived in Hatyai, Songkhla,Thailand and many people in my city have this problem.
    Who have this problem??

    Apple isnt here. this is a user based forum for technical questions. The solution is to restart, reset, and restore as new which is in the manual after that get it replaced for hard ware failure. if your within your one year warranty its replaced if it is out of the warranty then it is 199$

  • BUG? JDev 10.1.3.1.0 on MacBook Pro - problem using space and delete keys

    Is anyone using JDev 10.1.3.1.0 production release on a Macbook Pro? I am experiencing problems using the delete and space keys. The delete key no longer seems to work at all when using any of the key bindings including Default MacOS X. Using the spacebar also seems to have a conflict with the code completion feature. I am finding that the code completion always pops up when the space bar is used and no space is inserted with the editor. The space bar only works when used in conjuction with the shift key. Can anyone verify if they are able to use these keys in JDeveloper 10.1.3.1.0 on a Macbook Pro?
    Thanks,
    Richard

    This was from the dmg file.
    I found that in Preferences | Accelerators, Completion Insight lists 'Space' as an accelerator, right after 'CommandAIC'. Removing that fixed the problem, but I still can't fix the Delete issue.
    The Delete action is assigned to the 'Delete' key, which is recognizes as the key combination fn-Delete. I tried to assign the Delete Previous Char to just the delete key, but pressing the Delete key while in the New Accelerator field is not recognized - it just pretends as if I had not pressed a key.
    I'm looking at the the file:
    jdevhome/system/oracle.jdeveloper.10.1.3.39.84/Default_macosx.kdf
    trying to find entries for Delete and they are not in there - is there some other place I should be looking?
    Thanks,
    --ee                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Mac Mini w/ Apple USB keyboard - question about home and end keys

    I purchased a USB white Apple keyboard to go with my Mac mini.
    My question concerns the home and end keys. When I put the cusor focus in a text field or text area, I would expect that hitting the home key would take me to the beginning of the line and hitting the end key would take me to the end of the line.
    That's not the case?
    If a vertical scrollbar is used in the window, then the home key takes me to the top of the window and the end key takes me to the bottom of the window.
    Please forgive me, I've been on a PC for the last 10+ years, so I thought I should ask.
    What key or key combo moves you to the start and end of a text in a text field or text area?
    Thanks,

    923/3369
    Hi Todd,
    Use the arrow keys with the command key (⌘):
    command + left arrow -> beginning of the line
    command + right arrow -> end of the line
    command + arrow up -> beginning of the text
    command + arrow down -> end of the text
    Explore also the option key (⌥) possibilities, with the arrow keys:
    very handy too.
    Yes, the Home, End, Pageup and Pagedown keys are for controlling the whole document, not the text itself.
    HTH
    Axl

  • Problems with browsers and 'w' key since updates

    Hi
    I ran 'pacman -Syu' a little over a week ago, and since then I've been experiencing two rather odd problems.
    1.
    Using any web-browser (firefox, epiphany, songbird, etc), visiting pages that make use of javascript (i -think- that's the cause) makes the browser stop responding for 10-20 seconds. It goes grey and everything. And then eventually it starts working again. This occurs on many websites such as Facebook, Woot.com, to name a few big ones. It's really starting to drive me nuts.
    2.
    This problem's much weirder. After starting my computer, the w key is very unresponsive. By that I mean for a 'w' keystroke to register I need to hold down the 'w' key for 1 or 2 seconds, after which it will finally work. At first I thought this was a problem with my keyboard, but as the computer remains on, the problem slowly disappears - after about 30 minutes, the 'w' key works as expected. I don't think this is an X/GNOME problem, as I experience the same problems in the TTYs.
    I have a Sony Vaio FE-890:
    oliver@helios:~$ uname -a
    Linux helios 2.6.28-ARCH #1 SMP PREEMPT Fri Feb 13 11:03:55 CET 2009 x86_64 Intel(R) Core(TM)2 CPU T7600 @ 2.33GHz GenuineIntel GNU/Linux
    I've been updating frequently in the interim hoping the problems will go away, but so far no luck. Any thoughts?

    Hi
    Thanks for your suggestions.
    Also, flash doesn't work on webpages anymore. I'm assuming this is some problem with the nspluginwrapper thing...
    Here's pacman.log of the fateful upgrade:
    [2009-02-10 10:32] synchronizing package lists
    [2009-02-10 10:32] starting full system upgrade
    [2009-02-10 11:37] synchronizing package lists
    [2009-02-10 11:38] starting full system upgrade
    [2009-02-10 13:10] removed gnome-network-manager (0.6.5-1)
    [2009-02-10 13:10] upgraded tzdata (2008i-1 -> 2009a-1)
    [2009-02-10 13:10] Generating locales...
    [2009-02-10 13:10] en_US.UTF-8... done
    [2009-02-10 13:10] en_US.ISO-8859-1... done
    [2009-02-10 13:10] Generation complete.
    [2009-02-10 13:10] upgraded glibc (2.9-2 -> 2.9-4)
    [2009-02-10 13:10] upgraded readline (5.2.013-1 -> 5.2.013-2)
    [2009-02-10 13:10] upgraded bash (3.2.048-1 -> 3.2.048-3)
    [2009-02-10 13:10] upgraded dhcpcd (4.0.7-1 -> 4.0.10-1)
    [2009-02-10 13:10] upgraded pm-utils (1.2.3-3 -> 1.2.3-4)
    [2009-02-10 13:10] upgraded hal (0.5.11-4 -> 0.5.11-7)
    [2009-02-10 13:10] upgraded libnetworkmanager (0.6.6-1 -> 0.7.0-1)
    [2009-02-10 13:10] upgraded networkmanager (0.6.6-1 -> 0.7.0-1)
    [2009-02-10 13:10] installed network-manager-applet (0.7.0-1)
    [2009-02-10 13:10] upgraded aircrack-ng (1.0_rc1-1 -> 1.0_rc2-1)
    [2009-02-10 13:10] upgraded gcc-libs (4.3.2-2 -> 4.3.3-1)
    [2009-02-10 13:10] upgraded xcb-proto (1.2-2 -> 1.3-1)
    [2009-02-10 13:10] upgraded libxcb (1.1.90.1-1 -> 1.1.93-1)
    [2009-02-10 13:10] upgraded libx11 (1.1.5-2 -> 1.1.99.2-1)
    [2009-02-10 13:10] upgraded amsn (0.97.2-4 -> 0.97.2-8)
    [2009-02-10 13:10] ATTENTION DB PACKAGE:
    [2009-02-10 13:10] Please consider to run db_upgrade on Berkeley DB databases with a major db version number update.
    [2009-02-10 13:10] upgraded db (4.7.25-1 -> 4.7.25-2)
    [2009-02-10 13:10] upgraded apache (2.2.11-1 -> 2.2.11-2)
    [2009-02-10 13:10] upgraded libvorbis (1.2.0-1 -> 1.2.1rc1-1)
    [2009-02-10 13:10] upgraded avidemux (2.4.3-2 -> 2.4.4-1)
    [2009-02-10 13:10] upgraded texinfo (4.13a-1 -> 4.13a-3)
    [2009-02-10 13:10] upgraded binutils (2.19-1 -> 2.19.1-1)
    [2009-02-10 13:10] upgraded boost (1.36.0-2 -> 1.37.0-1)
    [2009-02-10 13:10] upgraded brasero (0.9.0-1 -> 0.9.1-1)
    [2009-02-10 13:10] upgraded curl (7.19.2-1 -> 7.19.3-1)
    [2009-02-10 13:10] upgraded pycairo (1.8.0-2 -> 1.8.2-1)
    [2009-02-10 13:10] upgraded pygtk (2.13.0-2 -> 2.14.0-1)
    [2009-02-10 13:10] upgraded deluge (1.1.0-1 -> 1.1.2-1)
    [2009-02-10 13:10] upgraded device-mapper (1.02.29-1 -> 1.02.30-1)
    [2009-02-10 13:10] upgraded ed (1.1-2 -> 1.2-1)
    [2009-02-10 13:10] upgraded eigen (1.0.5-1 -> 2.0.0-1)
    [2009-02-10 13:10] upgraded fakeroot (1.11.4-1 -> 1.12.1-1)
    [2009-02-10 13:10] upgraded file (4.26-1 -> 5.00-1)
    [2009-02-10 13:10] upgraded gcc (4.3.2-2 -> 4.3.3-1)
    [2009-02-10 13:10] upgraded libtasn1 (1.7-1 -> 1.8-1)
    [2009-02-10 13:10] upgraded gnutls (2.6.3-1 -> 2.6.4-1)
    [2009-02-10 13:10] upgraded inputproto (1.4.4-1 -> 1.5.0-1)
    [2009-02-10 13:10] upgraded xextproto (7.0.4-1 -> 7.0.5-1)
    [2009-02-10 13:10] upgraded libxext (1.0.4-1 -> 1.0.5-1)
    [2009-02-10 13:10] upgraded ghostscript (8.63-4 -> 8.64-1)
    [2009-02-10 13:10] upgraded hwdetect (2008.12-4 -> 2009.01-1)
    [2009-02-10 13:10] upgraded imagemagick (6.4.8.2-1 -> 6.4.9.2-1)
    [2009-02-10 13:10] upgraded inetutils (1.6-2 -> 1.6-3)
    [2009-02-10 13:10] warning: /etc/inittab installed as /etc/inittab.pacnew
    [2009-02-10 13:10] upgraded initscripts (2008.09-2 -> 2009.01-1)
    [2009-02-10 13:11] update desktop mime database ...
    [2009-02-10 13:11] upgraded inkscape (0.46-9 -> 0.46-10)
    [2009-02-10 13:11] upgraded mkinitcpio (0.5.21-1 -> 0.5.23-1)
    [2009-02-10 13:11] >>>
    [2009-02-10 13:11] >>> If you use the LILO bootloader, you should run 'lilo' before rebooting.
    [2009-02-10 13:11] >>>
    [2009-02-10 13:11] >>> Updating module dependencies. Please wait ...
    [2009-02-10 13:11] >>> MKINITCPIO SETUP
    [2009-02-10 13:11] >>> ----------------
    [2009-02-10 13:11] >>> If you use LVM2, Encrypted root or software RAID,
    [2009-02-10 13:11] >>> Ensure you enable support in /etc/mkinitcpio.conf .
    [2009-02-10 13:11] >>> More information about mkinitcpio setup can be found here:
    [2009-02-10 13:11] >>> http://wiki.archlinux.org/index.php/Mkinitcpio
    [2009-02-10 13:11]
    [2009-02-10 13:11] >>> Generating initial ramdisk, using mkinitcpio. Please wait...
    [2009-02-10 13:11] ==> Building image "default"
    [2009-02-10 13:11] ==> Running command: /sbin/mkinitcpio -k 2.6.28-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26.img
    [2009-02-10 13:11] :: Begin dry run
    [2009-02-10 13:11] :: Parsing hook [base]
    [2009-02-10 13:11] :: Parsing hook [udev]
    [2009-02-10 13:11] :: Parsing hook [autodetect]
    [2009-02-10 13:11] :: Parsing hook [pata]
    [2009-02-10 13:11] :: Parsing hook [scsi]
    [2009-02-10 13:11] :: Parsing hook [sata]
    [2009-02-10 13:11] :: Parsing hook [usb]
    [2009-02-10 13:11] :: Parsing hook [keymap]
    [2009-02-10 13:11] :: Parsing hook [filesystems]
    [2009-02-10 13:11] :: Generating module dependencies
    [2009-02-10 13:11] :: Generating image '/boot/kernel26.img'...SUCCESS
    [2009-02-10 13:11] ==> SUCCESS
    [2009-02-10 13:11] ==> Building image "fallback"
    [2009-02-10 13:11] ==> Running command: /sbin/mkinitcpio -k 2.6.28-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26-fallback.img -S autodetect
    [2009-02-10 13:11] :: Begin dry run
    [2009-02-10 13:11] :: Parsing hook [base]
    [2009-02-10 13:11] :: Parsing hook [udev]
    [2009-02-10 13:11] :: Parsing hook [pata]
    [2009-02-10 13:11] :: Parsing hook [scsi]
    [2009-02-10 13:11] :: Parsing hook [sata]
    [2009-02-10 13:11] :: Parsing hook [usb]
    [2009-02-10 13:12] :: Parsing hook [keymap]
    [2009-02-10 13:12] :: Parsing hook [filesystems]
    [2009-02-10 13:12] :: Generating module dependencies
    [2009-02-10 13:12] :: Generating image '/boot/kernel26-fallback.img'...SUCCESS
    [2009-02-10 13:12] ==> SUCCESS
    [2009-02-10 13:12] upgraded kernel26 (2.6.28.1-1 -> 2.6.28.4-1)
    [2009-02-10 13:12] upgraded lib32-freetype2 (2.3.7-1 -> 2.3.8-1)
    [2009-02-10 13:12] upgraded lib32-gcc-libs (4.3.2-1 -> 4.3.3-1)
    [2009-02-10 13:12] upgraded lib32-gtk2 (2.14.6-1 -> 2.14.7-1)
    [2009-02-10 13:12] upgraded lib32-readline (5.2-8 -> 5.2.013-1)
    [2009-02-10 13:12] upgraded libice (1.0.4-1 -> 1.0.5-1)
    [2009-02-10 13:12] upgraded libmikmod (3.1.12-1 -> 3.1.12-2)
    [2009-02-10 13:12] upgraded libnova (0.12.2-1 -> 0.12.3-1)
    [2009-02-10 13:12] upgraded libsndfile (1.0.17-2 -> 1.0.18-1)
    [2009-02-10 13:12] upgraded libsamplerate (0.1.4-1 -> 0.1.6-1)
    [2009-02-10 13:12] upgraded libxi (1.1.4-1 -> 1.2.0-1)
    [2009-02-10 13:12] upgraded lvm2 (2.02.43-1 -> 2.02.44-1)
    [2009-02-10 13:12] upgraded man-pages (3.16-1 -> 3.17-1)
    [2009-02-10 13:12] upgraded mlocate (0.21-1 -> 0.21.1-1)
    [2009-02-10 13:12] upgraded opal (3.4.4-2 -> 3.4.4-2.1)
    [2009-02-10 13:12] * relogin or source /etc/profile.d/openoffice.sh
    [2009-02-10 13:12] * see http://wiki.archlinux.org/index.php/Openoffice
    [2009-02-10 13:12] how to use extensions, e.g. for spell checking
    [2009-02-10 13:12] see /opt/openoffice/share/extension/install what
    [2009-02-10 13:12] is shipped with this package
    [2009-02-10 13:12] upgraded openoffice-base (3.0.0-4 -> 3.0.1-1)
    [2009-02-10 13:12] upgraded patch (2.5.9-1 -> 2.5.9-2)
    [2009-02-10 13:12] upgraded php (5.2.7-2 -> 5.2.8-1)
    [2009-02-10 13:13] upgraded pidgin (2.5.3-1 -> 2.5.4-1)
    [2009-02-10 13:13] upgraded pixman (0.12.0-1 -> 0.14.0-1)
    [2009-02-10 13:13] upgraded pycups (1.9.42-2 -> 1.9.45-1)
    [2009-02-10 13:13] upgraded qt (4.4.3-4 -> 4.4.3-5)
    [2009-02-10 13:13] upgraded reiserfsprogs (3.6.20-3 -> 3.6.21-1)
    [2009-02-10 13:13] upgraded sdparm (1.03-1 -> 1.03-2)
    [2009-02-10 13:13] upgraded smpeg (0.4.4-4 -> 0.4.4-5)
    [2009-02-10 13:13] upgraded sound-theme-freedesktop (0.1-1 -> 0.2-1)
    [2009-02-10 13:13] upgraded syslog-ng (2.0.9-1 -> 2.1.3-2)
    [2009-02-10 13:13] upgraded system-config-printer (1.1.1-1 -> 1.1.3-1)
    [2009-02-10 13:13] extracting fonts... done.
    [2009-02-10 13:13] rebuilding font cache... done.
    [2009-02-10 13:13] upgraded ttf-ms-fonts (2.0-1 -> 2.0-2)
    [2009-02-10 13:13] upgraded unrar (3.8.5-1 -> 3.8.5-2)
    [2009-02-10 13:13] upgraded vlc (0.9.8a-4 -> 0.9.8a-5)
    [2009-02-10 13:13] upgraded wireshark (1.0.5-1 -> 1.0.6-1)
    [2009-02-10 13:13] upgraded xcb-util (0.3.2-1 -> 0.3.3-1)
    [2009-02-10 13:13] upgraded xf86-input-evdev (2.1.0-1 -> 2.1.2-1)
    [2009-02-10 13:13] upgraded xf86-input-keyboard (1.3.1-1 -> 1.3.2-1)
    [2009-02-10 13:13] upgraded xf86-input-synaptics (0.99.3-1 -> 1.0.0-1)
    [2009-02-10 13:13] upgraded xine-lib (1.1.16.1-1 -> 1.1.16.1-2)
    [2009-02-10 13:13] upgraded xkeyboard-config (1.4-2 -> 1.5-1)
    [2009-02-10 13:13] upgraded xorg-xinit (1.1.0-1 -> 1.1.1-1)
    [2009-02-10 13:13] upgraded xterm (239-1 -> 241-1)
    [2009-02-10 15:15] synchronizing package lists
    [2009-02-10 15:16] starting full system upgrade
    [2009-02-10 15:17] ==> to use yaourt as user,add these entries to /etc/sudoers:
    [2009-02-10 15:17] user ALL=NOPASSWD: /usr/bin/pacman
    [2009-02-10 15:17] user ALL=NOPASSWD: /usr/bin/pacdiffviewer
    [2009-02-10 15:17] (Please, use sudo very carefully)
    [2009-02-10 15:17] ==> for a full colorized output, install pacman-color and set PacmanBin in /etc/yaourtrc
    [2009-02-10 15:17] upgraded yaourt (0.9.1-1 -> 0.9.2.4-1)
    [2009-02-10 15:18] synchronizing package lists
    [2009-02-10 15:19] starting full system upgrade
    [2009-02-10 15:24] upgraded bin32-wine (1.1.10-1 -> 1.1.14-1)
    [2009-02-10 15:24] Reading package info from stdin ... done.
    [2009-02-10 15:24] Writing new package config file... done.
    [2009-02-10 15:24] upgraded haskell-sdl (0.5.4-1 -> 0.5.5-1)
    [2009-02-10 15:24] Reading package info from stdin ... done.
    [2009-02-10 15:24] Writing new package config file... done.
    [2009-02-10 15:24] upgraded haskell-sdl-ttf (0.5.2-1 -> 0.5.5-1)
    [2009-02-10 15:25] "nspluginwrapper -r $HOME/.mozilla/plugins/* ; nspluginwrapper -v -a -i" to recreate plugins after update
    [2009-02-10 15:25] Konqueror users need to add $HOME/.mozilla/plugins/ to konqueror plugins path
    [2009-02-10 15:25] upgraded nspluginwrapper (1.0.0-1 -> 1.2.2-1)
    [2009-02-10 15:25] installed lib32-curl (7.19.3-1)
    [2009-02-10 15:25] installed lib32-nspr (4.7.3-1)
    [2009-02-10 15:25] installed lib32-sqlite3 (3.6.10-1)
    [2009-02-10 15:25] installed lib32-nss (3.12.2-1)
    [2009-02-10 15:26] Run
    [2009-02-10 15:26] nspluginwrapper -v -r ~/.mozilla/plugins/npwrapper.libflashplayer.so
    [2009-02-10 15:26] nspluginwrapper -v -a -i
    [2009-02-10 15:26] to upgrade the plugin
    [2009-02-10 15:26] upgraded nspluginwrapper-flash (9.0.124.0-1 -> 10.0.15.3-3)

  • Problem about put and get

    hi there,
    I met a problem, when i put the data, and get it.
    key data
    aaa aaaaaa
    bbb bbbbbb
    ccc cccccc
    I have put "aaa", "bbb" and "ccc" into db, but when I try to get the key for "aaa" , "bbb", it return the data "cccccc", how can I solve it?
    after that, when i get the key "ddd", "eee" , and all strings are length 3, the key does not in the DB, it also return the data "cccccc". Did I do something wrong on my code?
    void Set1(CString sKey)
    int ret;
    std::string sdb = "test.db";
    Db db(NULL, 0);
    ret = db.open(NULL,
         sdb.c_str(),
         NULL,
         DB_BTREE,
    DB_CREATE,
         0);
    std::string skey, sdata;
    skey = sKey;
    sdata.append(skey);
    sdata.append(skey);
    Dbt key(&skey, skey.length());
    Dbt data(&sdata, sdata.length());
    ret = db.put(NULL, &key, &data, 0);
    if(ret==0){
    TRACE("success\n");
    ret = db.close(0);
    void Get1(CString sKey)
    int ret;
    std::string sdb = "test.db";
    ret = db.open(NULL,
    sdb.c_str(),
         NULL,
         DB_BTREE,
         DB_CREATE,
         0);
    Dbc *cur;
    ret = db.cursor(NULL, &cur, 0);
    std::string skey, s2, a2;
    skey = sKey;
    Dbt key(&skey, skey.length());
    Dbt data;
    memset(&data, 0, sizeof(data));
    ret = cur->get(&key, &data, DB_SET);
    if(ret!=DB_NOTFOUND){
    a2 = (std::string*) data.get_data();
    s2 = (std::string*) key.get_data();
    TRACE("FOUND %s %s\n", s2->c_str(), a2->c_str());
    ret = cur->close();
    ret = db.close(0);
    }

    Hi,
    The problem seems to be with these lines:
    std::string skey, sdata;
    Dbt key(&skey, skey.length());
    Dbt data(&sdata, sdata.length());You are constructing a Dbt with data that is actually a pointer to a C++ std::string object. You want the value to be an actual c style string.
    An alternative would be to construct the Dbts like:
    Dbt key(skey.c_str(), skey.length());
    Dbt data(sdata.c_str(), sdata.length());You will need to create a new std::string out of any data retrieved from the database as well. Since it will now be just a C-style char * string.
    I hope this helps.
    Regards,
    Alex Gorrod, Oracle

  • Problem With Home And End keys

    Hi
    I cleaned the keyboard of my ibook G4 about two days ago. The ibook was switched off at the time but now I can't seem to access the left (Home) and right (End) cursor keys (When pressed nothing happens).
    The up (Pg Up) and down (Pg Dn) keys are working fine. I've obviously pressed a combination of keys that has resulted in turning off my Left and Right cursor keys. How on earth do I rectify what I've done. I've looked in my G4 manual but to no avail. If somebody can help me that would be terrific.
    Many thanks
    L.

    zsh unfortunately doesn't read /etc/inputrc, which tells the shell what commands sent by the terminal emulator mean.
    add the following to your .zshrc, and you should be fine.
    # key bindings
    bindkey "e[1~" beginning-of-line
    bindkey "e[4~" end-of-line
    bindkey "e[5~" beginning-of-history
    bindkey "e[6~" end-of-history
    bindkey "e[3~" delete-char
    bindkey "e[2~" quoted-insert
    bindkey "e[5C" forward-word
    bindkey "eOc" emacs-forward-word
    bindkey "e[5D" backward-word
    bindkey "eOd" emacs-backward-word
    bindkey "ee[C" forward-word
    bindkey "ee[D" backward-word
    bindkey "^H" backward-delete-word
    # for rxvt
    bindkey "e[8~" end-of-line
    bindkey "e[7~" beginning-of-line
    # for non RH/Debian xterm, can't hurt for RH/DEbian xterm
    bindkey "eOH" beginning-of-line
    bindkey "eOF" end-of-line
    # for freebsd console
    bindkey "e[H" beginning-of-line
    bindkey "e[F" end-of-line
    # completion in the middle of a line
    bindkey '^i' expand-or-complete-prefix
    by the way, i've changed some of the keys. for instance, ctrl-left and ctrl-right move back and forward by whole words. default is alt i believe.

  • Problem about rmic and rmiregistry

    I am new to java!
    My OS is Win2000 and the java compiler I installed is Sun One Studio 4 CE. The teaching book I used is teh JAVA2 unleash.
    I try to copy some example in the book and run it! The problem I have the book didn't quite tell me how to compile it!
    The chapter is about the RMI and the step describe in the book are followed:
    1) Move to the directory containing all your classes and compile them. (Which I did)
    2) Move to the root directory
    c:\>rmic unleashed.ch2.GreeterImpl (problem)
    3) Open one command window and type
    c:\> rmiregistry (problem)
    4) Open another command window and type
    c:\> java unleashed.ch2.GreeterServer
    5) open the thrid window and type
    c:\> java unleashed.ch2.GreetingClient
    Problem part:
    I try to follow the step and open a DOS Prompt and type step two and three!! It seems that the window don't understand the command rmic and rmiregistry! What should I do??
    Thank you very much for helping! Thanks!!
    Ferdinand

    you need to add the java bin directory to your 'path' system environment variable

  • A problem about Proc and oci

    I got a new task (coding in c language with oci or proc to operate remote oracle. the develope environment is linux server is windows OS ) ,but I have nothing experice about it previously. in the process of using oci and proc, amount of problems appeared.
    the first question i want to make explicit is , can I testing and running the program with out the client of oracle. in a other word ,only use the .so files to compiling and testing .in linux environment .
    If the answer is that we can . how can i program with oci or proc?
    as I know in the samples of oracle ,every demo is only link to the local database.
    and the resource about this field is so limit. I can not find any usable material with google.
    in my familar condition ,if we need connect to remote database ,we should provide the hostname or ip address and the prot num of oracle service . but in OCI library ,there are two functions olog and ocilogon can use to log to service .how can i use it?
    eg. if the server hostname is dbserver/192.168.1.2 and port is 1521,the dbname is iv. how can i use olog or ocilogon to log on the server? thanks very much !!!
    btw: if we using proc to connect server. how can i connect to server?
    waiting on line...
    Thanks.

    You must install an Oracle Client in order to proceed. The client installation is included in the Oracle Database installation disc.
    Afterwards, use "netca" to configure the connection to your remote DB. Alternatively, you could edit the tnsnames.ora file manually if so you wish.
    For reading material, type "Pro*C/C++ Precompiler Programmer's Guide" in google.
    Message was edited by:
    jonjac

  • Strange Problem about KeyListener, and FocusListener

    Hi,Please help me with this problem.
    I create a JTable and setCellEditor by using my customerized TextField
    The problem is: when I edit JTable Cell, the value can not be changed and I can not get Key Event and Focus Event.
    here is my source:
    //create normal JTable instance,and then initlize it
    private void initTable(Vector folders)
    TableColumn tempcol = getColumnModel().getColumn(0);
    tempcol.setCellEditor(new DefaultCellEditor(new MyTextField()));
    for(int i=0;i<folders.size();i++)
    mddDataSource ds=(mddDataSource) folders.get(i);
    String name = ds.getDataSourceName();
    layers.add(name);
    for(int i=0;i<layers.size();i++){
    Vector temp = new Vector();
    temp.add(layers.get(i));
    temp.add(layers.get(i));
    dtm.addRow(temp);
    // My Text Field cell
    class MyTextField extends JTextField implements FocusListener, KeyListener
    MyTextField()
    setOpaque (false);
    addKeyListener(this);
    addFocusListener(this);
    MyTextField(String text)
    setOpaque (false);
    addKeyListener(this);
    addFocusListener(this);
    public void focusGained(FocusEvent e) {
    System.out.println("get Focus");
    public void focusLost(FocusEvent e) {
    instance.setValue(getText());
    public void keyTyped(KeyEvent e){
    instance.setValue(getText());
    public void keyPressed(KeyEvent e){
    System.out.println("get Key ");
    public void keyReleased(KeyEvent e){
    instance.setValue(getText());
    If there are some good sample, please tell me the link or give me some suggestion.
    Thanks in advanced

    Thanks for your help.
    The problem still exist. It does not commit the value that I input.
    Maybe I should say it clearly.
    I have create JPanel include three JPanel:
    Left Panel and right upper-panel and right borrom panel.
    The JTable instance is on right-upper Panel.
    If I edit one of row at JTable and then click JTable other row,the value can be commited. if I edit one of row and then push one Button on
    the right-bottom button to see the editting cell value.It does not commit value.
    when I use debug style, and set breakpoint the
    foucsGained or KeyTyped,
    It never stopes at there,So I assume that the Editing cell never get focus.
    Is there a bug at Java if we move focus on other Panel, that JTable can not detect the Focus lost or focus gained event?
    Thanks

  • Problem with H and Option key on a macbook keyboard

    I have a problem with my macbook keyboard, any time i tried to use the "h" or "option" keys i get the TM symbol.
    All other keys works perfect
    i don't know what happend?
    Thanks

    To access NTFS Windows from your MAC OS via Bootcamp, use this software:
    http://www.paragon-software.com/home/ntfs-mac/
    To access Mac from your Windows via Bootcamp, use this software:
    http://www.mediafour.com/products/macdrive/bootcamp/

  • Problems with "v", "]", and command keys on the keyboard

    Hi,
    On my MacBook, pressing either the "v" key or the command key to the left of the space bar, without pressing the other one as in a keyboard shortcut, pastes what is currently on my clipboard. Pressing only the command key to the right of the space bar, and not the "]" key in combination, moves me forward in my web browser. When I do press the "]" key, nothing happens (I had to copy and paste the "]" and the "v" for this post). Obviously this is somewhat annoying as typing anything with these two symbols becomes a chore. I am still able to use other keyboard shortcuts, however, but in doing so the command key either pastes from the clipboard or, if I'm using a web browser, moves me to the next page in my history before completing the shortcut. How can I fix this? Thanks.

    Try resetting your SMC.
    Resetting the System Management Controller >>
    Try resetting PRAM:
    1. Shut down the computer.
    2. Locate the following keys on the keyboard: Command, Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    3. Turn on the computer.
    4. Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.
    5. Hold the keys down until the computer restarts and you hear the startup sound (bong) for four times.
    6. Release the keys.
    If neither help, you could have a hardware issue with the keyboard.
    Dave M.
    MacOSG Founder/Ambassador  An Apple User Group  iTunes: MacOSG Podcast
    Creator of 'Mac611 - Mobile Mac Support' (designed exclusively for an iPhone/iPod touch)

  • Problem with foreign and primary keys migration from SQL Server to Oracle

    Hi folks, i'm using SQL Developer to migrate from a SQL Server database to Oracle and i'm stuck with a couple issues:
    The worst of them so far is the fact that i can't migrate any of the PKs and FKs. After successfully capturing the SQL Server DB model and converting it to Oracle, when the tool generates the scripts, all ALTER TABLE queries that add the PKs and FKs have their target columns duplicated.
    for example: when i'm trying to migrate a simple table that contains an Id (PK) and Name columns, the tool generates the following scripts:
    PROMPT Creating Table TestTable...
    CREATE TABLE TestTable (
    Id NUMBER(10,0) NOT NULL,
    Name VARCHAR2 NOT NULL
    PROMPT Creating Primary Key Constraint PK_TestTable on table TestTable ...
    ALTER TABLE TestTable
    ADD CONSTRAINT PK_TestTable PRIMARY KEY
    Id,
    Id
    ENABLE
    As for the FKs, the tool duplicates the columns as well:
    ALTER TABLE SomeTable
    ADD CONSTRAINT FK_SomeTable_SomeTable2 FOREIGN KEY
    SomeTable2Id,
    SomeTable2Id
    REFERENCES SomeTable2
    Id,
    Id
    ENABLE
    Does anyone have a clue on how to solve these issues? I'd be greatly thankful for any answers!

    Hi Fernando,
    I was unable to replicate this issue. My primary / foreign keys where defined using unique columns.
    PROMPT Creating Primary Key Constraint PK_Suppliers on table Suppliers ...
    ALTER TABLE Suppliers
    ADD CONSTRAINT PK_Suppliers PRIMARY KEY
    SupplierID
    ENABLE
    I tried a few things like
    capturing twice and renaming both models the same
    renaming the converted models
    but with no luck.
    I think this issue is occuring either at the capture or convert phase.
    1) Are you performing the capture online or offline?
    2) Can you provide a the entire DDL for one of these tables and its indexes to see if I can replicate?
    3) Did the capture or convert fail or have to be redone at any stage ?
    I all else fails I would attempt a capture and convert again using a brand new repository (create a new schema in Oracle and associate the migration repository with it).
    Regards,
    Dermot
    SQL Developer Team
    Edited by: Dermot ONeill on Oct 22, 2009 12:18 PM

  • Problem about jtable and database

    The problem is that when i clicked the button to save the values of textfields and text area, although the table is supposed to show the new list of datas from the db, it adds the new data list to the end of the first list. I have to list one old and one new in jtable.
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    * DatabaseConnection.java
    * Created on 28.Aðu.2008, 11:24:52
    package databaseconnection;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.Vector;
    import javax.swing.table.AbstractTableModel;
    import javax.swing.table.TableModel;
    * @author ARAGORN
    public class DatabaseConnection extends javax.swing.JFrame {
        /** Creates new form DatabaseConnection */
        public DatabaseConnection() {
            try {
                Class.forName("com.mysql.jdbc.Driver");
                con = DriverManager.getConnection("jdbc:mysql://localhost:3306/Students", "admin", "1837837");
                st = con.createStatement();
            } catch (Exception e) {
                System.out.println("Database Connection Error!");
            try {
                ResultSet rs = st.executeQuery("SELECT*FROM studentdata");
                while (rs.next()) {
                    Object[] rowValues = {rs.getInt(1),rs.getString(2),rs.getString(3),rs.getInt(4),rs.getString(5),rs.getString(6),rs.getInt(7)};
                    row.addElement(rowValues);
                data = new Object[row.size()][7];
                for(int i=0;i<row.size();i++){
                    data=(Object[]) row.get(i);
    } catch (Exception e) {
    System.out.println("reading error!");
    initComponents();
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {
    jScrollPane1 = new javax.swing.JScrollPane();
    jTable1 = new javax.swing.JTable();
    jPanel1 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    jTextField1 = new javax.swing.JTextField();
    jSeparator1 = new javax.swing.JSeparator();
    jLabel2 = new javax.swing.JLabel();
    jTextField2 = new javax.swing.JTextField();
    jLabel3 = new javax.swing.JLabel();
    jTextField3 = new javax.swing.JTextField();
    jTextField4 = new javax.swing.JTextField();
    jLabel4 = new javax.swing.JLabel();
    jScrollPane2 = new javax.swing.JScrollPane();
    jTextArea1 = new javax.swing.JTextArea();
    jLabel5 = new javax.swing.JLabel();
    jLabel6 = new javax.swing.JLabel();
    jTextField5 = new javax.swing.JTextField();
    jLabel7 = new javax.swing.JLabel();
    jTextField6 = new javax.swing.JTextField();
    jButton1 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();
    jButton3 = new javax.swing.JButton();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    addWindowListener(new java.awt.event.WindowAdapter() {
    public void windowOpened(java.awt.event.WindowEvent evt) {
    formWindowOpened(evt);
    jTable1.setModel(new javax.swing.table.DefaultTableModel(data,heading)
    jScrollPane1.setViewportView(jTable1);
    jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Öðrenci Bilgileri", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N
    jLabel1.setText("Öðrenci No : ");
    jLabel2.setText("Adý : ");
    jLabel3.setText("Sýnýf : ");
    jLabel4.setText("Soyad : ");
    jTextArea1.setColumns(20);
    jTextArea1.setRows(5);
    jScrollPane2.setViewportView(jTextArea1);
    jLabel5.setText("Adress : ");
    jLabel6.setText("Tel : ");
    jLabel7.setText("Þube : ");
    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
    jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel1Layout.createSequentialGroup()
    .addGap(22, 22, 22)
    .addComponent(jLabel1)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addContainerGap(364, Short.MAX_VALUE))
    .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 581, Short.MAX_VALUE)
    .addGroup(jPanel1Layout.createSequentialGroup()
    .addGap(40, 40, 40)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    .addComponent(jLabel6)
    .addComponent(jLabel2)
    .addComponent(jLabel4)
    .addComponent(jLabel5))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel1Layout.createSequentialGroup()
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
    .addComponent(jTextField4)
    .addComponent(jTextField2, javax.swing.GroupLayout.DEFAULT_SIZE, 131, Short.MAX_VALUE))
    .addGap(28, 28, 28)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    .addComponent(jLabel3)
    .addComponent(jLabel7))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jTextField3, javax.swing.GroupLayout.DEFAULT_SIZE, 248, Short.MAX_VALUE)
    .addComponent(jTextField6, javax.swing.GroupLayout.DEFAULT_SIZE, 248, Short.MAX_VALUE)))
    .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 320, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addGap(49, 49, 49))
    jPanel1Layout.setVerticalGroup(
    jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel1Layout.createSequentialGroup()
    .addContainerGap()
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(jLabel1)
    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(jLabel2)
    .addComponent(jLabel3)
    .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(jLabel4)
    .addComponent(jLabel7)
    .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jLabel5)
    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(jLabel6)
    .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addContainerGap())
    jButton1.setText("Kaydet");
    jButton1.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton1ActionPerformed(evt);
    jButton2.setText("Temizle");
    jButton2.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton2ActionPerformed(evt);
    jButton3.setText("Çýk");
    jButton3.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton3ActionPerformed(evt);
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addContainerGap()
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 597, Short.MAX_VALUE)
    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
    .addComponent(jButton1)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jButton2)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jButton3)))
    .addContainerGap())
    layout.setVerticalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addContainerGap()
    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addGap(18, 18, 18)
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(jButton1)
    .addComponent(jButton2)
    .addComponent(jButton3))
    .addGap(38, 38, 38))
    pack();
    }// </editor-fold>
    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {                                        
    System.exit(0);
    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {                                        
    jTextField1.setText("");
    jTextField2.setText("");
    jTextField3.setText("");
    jTextField4.setText("");
    jTextField5.setText("");
    jTextField6.setText("");
    jTextArea1.setText("");
    private void formWindowOpened(java.awt.event.WindowEvent evt) {                                 
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
    try {
    st.executeUpdate("INSERT studentdata(Ogrenci_no,Ad,Soyad,Sinif,Sube,Adres,Tel) VALUES(" +
    Integer.parseInt(jTextField1.getText()) + ", '" +
    jTextField2.getText() + "', '" +
    jTextField4.getText() + "', " +
    Integer.parseInt(jTextField3.getText()) + ", '" +
    jTextField6.getText() + "', '" +
    jTextArea1.getText() + "', " +
    Integer.parseInt(jTextField5.getText()) +
    } catch (SQLException e) {
    System.out.println("Writing data Error!");
    try {
    ResultSet rs = st.executeQuery("SELECT * FROM studentdata");
    while (rs.next()) {
    Object[] rowValues = {rs.getInt(1),rs.getString(2),rs.getString(3),rs.getInt(4),rs.getString(5),rs.getString(6),rs.getInt(7)};
    row.addElement(rowValues);
    data = new Object[row.size()][7];
    for(int i=0;i<row.size();i++){
    data[i]=(Object[]) row.get(i);
    } catch (Exception e) {
    System.out.println("reading error!");
    jTable1.setModel(new MyTableModel());
    jTable1.setVisible(true);
    * @param args the command line arguments
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new DatabaseConnection().setVisible(true);
    // Variables declaration - do not modify
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JTable jTable1;
    private javax.swing.JTextArea jTextArea1;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JTextField jTextField2;
    private javax.swing.JTextField jTextField3;
    private javax.swing.JTextField jTextField4;
    private javax.swing.JTextField jTextField5;
    private javax.swing.JTextField jTextField6;
    // End of variables declaration
    Connection con;
    Statement st;
    Vector row = new Vector();
    Object[][] data;
    Object[] heading = {"Öðrenci_No","Ad","Soyad","Sýnýf","Sube","Adres","Tel"};
    class MyTableModel extends AbstractTableModel{
    public int getColumnCount(){
    return heading.length;
    public int getRowCount(){
    return data.length;
    @Override
    public String getColumnName(int column){
    return heading[column].toString();
    public Object getValueAt(int row, int column){
    return data[row][column];
    public boolean isCellEditable(){
    return false;
    @Override
    public void setValueAt(Object value, int row, int column){
    data[row][column] = value;
    fireTableCellUpdated(row, column);
    }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

    any one to help ?

Maybe you are looking for