Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: Welcome Note and a Question

  1. #1
    Junior Member
    Join Date
    Jun 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Welcome Note and a Question

    Delighted to be on a forum where I can have my queries answered. I am an old Java programmer and the need to program in Java has arisen again. please I need guidance on how to carry out a task.

    The task is to write a Java program that will populate an SQL database with the content of a text file. Help please!!!


  2. #2
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,676
    Thanks
    25
    Thanked 329 Times in 305 Posts

    Default Re: Welcome Note and a Question

    Well, depending on where the text file is, you can use Scanner (Scanner (Java Platform SE 6)) or BufferedReader (BufferedReader (Java Platform SE 6)). Then use the Database classes to communicate and write to the database (Statement, Connection, ResultSet, ect.).
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

  3. #3
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: Welcome Note and a Question

    Welcome to the forums kahlit and welcome back to Java
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

  4. #4
    Junior Member
    Join Date
    Jun 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Welcome Note and a Question

    Thank you for you response. would appreciate if you can give a step by step guide on what i need to do as this is completely new to me. still a beginner please. I am just going to create the text file and the database.

  5. #5
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: Welcome Note and a Question

    Firstly I suggest writing something that will allow you to connect to an SQL database. Then you can worry about populating it..

    Is it a mySQL database?

    MySQL and Java JDBC - Tutorial

    When you move onto reading the file..

    http://www.javaprogrammingforums.com...ner-class.html
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

Similar Threads

  1. Loop to note position of lowest number
    By fortune2k in forum Loops & Control Statements
    Replies: 3
    Last Post: November 23rd, 2010, 10:05 AM
  2. unsafe operations note??
    By bookface in forum What's Wrong With My Code?
    Replies: 3
    Last Post: March 22nd, 2010, 09:58 AM