Results 1 to 4 of 4
  1. #1
    yui07 is offline Member
    Join Date
    Apr 2014
    Posts
    3
    Rep Power
    0

    Default how to get value from database to use in variable

    i'm new withh java netbeans, and i want to make program where variable from database. how to get value from database to use in variable, please help me

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,730
    Blog Entries
    7
    Rep Power
    21

    Default Re: how to get value from database to use in variable

    Netbeans has nothing to do with it; for now, consider it your compiler, your editor and then some. Do you know how to use the JDBC framework? Are you sure you want to fire up an entire database engine for just one (or a few) values?

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    yui07 is offline Member
    Join Date
    Apr 2014
    Posts
    3
    Rep Power
    0

    Default Re: how to get value from database to use in variable

    Quote Originally Posted by JosAH View Post
    Netbeans has nothing to do with it; for now, consider it your compiler, your editor and then some. Do you know how to use the JDBC framework? Are you sure you want to fire up an entire database engine for just one (or a few) values?

    kind regards,

    Jos
    i don't know how to use the JDBC framework, because i'm new with programming. i want to make all values from field in database to use in variable for the process. if netbeans has nothing to do it, how i'm suppose to do?

  4. #4
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,031
    Rep Power
    4

    Default Re: how to get value from database to use in variable

    Quote Originally Posted by yui07 View Post
    i don't know how to use the JDBC framework, because i'm new with programming. i want to make all values from field in database to use in variable for the process. if netbeans has nothing to do it, how i'm suppose to do?
    Here's a path you can follow:
    - Create a database with your favourite DB Vendor. MySQL/MariaDB sounds like the one you want.
    - Create a table with some columns
    - Insert some data
    - Start Firefox
    - Read this: Lesson: JDBC Introduction (The Java™ Tutorials > JDBC(TM) Database Access)
    - Start Netbeans
    - Copy some of the examples and adapt them to your situation (database name, host, username, password, etc)
    - Run it
    - ...
    - Profit!
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2™ © 2013

Similar Threads

  1. local variable and instance variable
    By dhia annur in forum New To Java
    Replies: 7
    Last Post: 12-24-2013, 05:01 AM
  2. Replies: 2
    Last Post: 11-02-2013, 09:53 AM
  3. Replies: 2
    Last Post: 01-09-2013, 09:10 PM
  4. How to compare variable with multiple variable?
    By mharckz009 in forum New To Java
    Replies: 5
    Last Post: 09-11-2012, 05:33 PM
  5. Dynamic variable name based on other variable
    By nadissen in forum Eclipse
    Replies: 4
    Last Post: 05-06-2011, 07:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •