User Profile

Collapse

Profile Sidebar

Collapse
08butoryr
08butoryr
Last Activity: Jul 11 '08, 02:16 PM
Joined: Sep 26 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Never mind, I figured it out; I used the INSERT INTO statement but specififed only 1 field to insert to so it worked out. Thanks a million for your unwavering help, this is a 5-star site!
    See more | Go to post

    Leave a comment:


  • Excellent, it worked! The program can now select the first row and print it succesfully, but I have a problem inserting the field into the other table. I've been trying to upload a screenshot of the table but it's not working... The table is called GroupA, the fields are: Team, Played, Won, Lost, Draw, GoalsFor, GoalsAgainst and Points. I've sorted the table by Points (Descending) and I need to insert the name of the team (Team) into another table,...
    See more | Go to post

    Leave a comment:


  • 08butoryr
    started a topic Database SQL: Select 1st record from a table..
    in Java

    Database SQL: Select 1st record from a table..

    I need to select the first record of a sorted table to move one of the fields of that record to a different table using an sql statement(s) in java. Please help someone?

    Thanks in advance
    See more | Go to post

  • Excellent! I'll get right to it tomorrow at school and let you know if I have any problems. Thanks a mil....
    See more | Go to post

    Leave a comment:


  • Thank you so much for responding to my thread firstly, I really do appreciate it. I looked up the collections.shu ffle() method and it seems to be the solution. Can you please elaborate on exactly how I'd use it? Thanks again!...
    See more | Go to post

    Leave a comment:


  • 08butoryr
    started a topic Database SQL high school: Soccer round robin?
    in Java

    Database SQL high school: Soccer round robin?

    Hi everyone! this should be pretty simple for programmers on this forum... I need to design a java program which interacts with a MS Access DB in order to simulate the progression of a soccer round robin (e.g. FA Cup). i.e. Select 2 teams (out of 16 teams) randomly to play each other & determine the winner, who therefore plays the winner of one of the other matches etc. until the final winner is determined. I've created a database (SoccerChalleng e)...
    See more | Go to post

  • Thank you very much - I will definitely take it!...
    See more | Go to post

    Leave a comment:


  • It is Access. But in fact I've been working on this the whole day and I've virtually completed the whole thing. I have just 2 small problems left:
    1. In the search method, I need to figure out how to display "Name not found" when the user inputs a name that's not in the database. I tried using the following code but it didn't work:
    Code:
    boolean inputRepeatedly = true;
    while (inputRepeatedly = true)
    {
    try
    ...
    See more | Go to post

    Leave a comment:


  • Thanks also for responding. The database I am using is called "School". How do I tell if the name is of type varchar or varchar2? Do I check directly in the database?...
    See more | Go to post

    Leave a comment:


  • Firstly, thank you very much for responding to my problem. "Student Name" is indeed one of the column names in my table....
    See more | Go to post

    Leave a comment:


  • 08butoryr
    started a topic SQL & Database: Selecting & Deleting a record
    in Java

    SQL & Database: Selecting & Deleting a record

    Can someone please tell me what's wrong with this instruction:

    Code:
    String sql = "SELECT * FROM tblStudent WHERE Student Name = Samuel";
    ...And this one:
    Code:
    String input = JOptionPane.showInputDialog("Who do you want to delete:");
    String sql = "DELETE * FROM tblStudent WHERE Student Name = " + input;
    See more | Go to post

  • 08butoryr
    replied to Need help with Database and SQL Please
    in Java
    I tried what you suggested and it helped me to solve the problems with the Insert method and showed what's wrong with the Delete method - I copied the following from the console so that you can take a look and identify what I need to change, because I'm not sure:

    Code:
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'Student Name = Thabo'. 
      at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
    ...
    See more | Go to post

    Leave a comment:


  • 08butoryr
    replied to Need help with Database and SQL Please
    in Java
    Ok I'm going to try that right now and get back to you....
    See more | Go to post

    Leave a comment:


  • 08butoryr
    replied to Need help with Database and SQL Please
    in Java
    Ok thanks a lot! That takes care of the ResultsSetMetaD ata, but what about the other things like inserting, searching, deleting and editing? I tried, as you can see from my source code, to use the sql commands the way I learned, but when I run each of the portions it doesn't work (e.g. I select "Insert a student" from the menu and it prompts the user to input the name, class and house, but then nothing happens. What's wrong with my code?...
    See more | Go to post

    Leave a comment:


  • 08butoryr
    replied to Need help with Database and SQL Please
    in Java
    Sorry about that, this is my first post - I will remember that next time thanks for pointing it out. About the ResultSetMetaDa ta, the problem is I'm not sure how to apply it in the context of the program. This is what I am supposed to do:

    "Change the displayCD() method so that it uses the ResultsSetMetaD ata interface to obtain the column names using the column numbers. You need to instantiate a new ResultSetMetaDa ta object before...
    See more | Go to post

    Leave a comment:


  • 08butoryr
    started a topic Need help with Database and SQL Please
    in Java

    Need help with Database and SQL Please

    Hey guys I could really use your help with some very basic java programming. I know you programming fundis out there will find this child's play but I'm struggling with it a bit because I'm realtively new at programming.The topic is "Using a database and SQL". The exercise supplies a table called tblStudent in a database called School and requires you to perform certain actions with the table. Here are the requirements that I am having...
    See more | Go to post
No activity results to display
Show More
Working...