Check out the sun JDBC tutorial at : http://java.sun.com/docs/books/tutorial/jdbc/index.html.  That tutorial really is a great place to start when you are learning JDBC. 
 
- Midian
-----Original Message-----
From: Kevin Fonner [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 14, 2001 2:16 PM
To: [EMAIL PROTECTED]
Subject: resultset Question

I want to grab just the first record in a Query of my database.  I thought that this would be pretty simple???
Acording to my books they said that after executing...
resultSet = statement.executeQuery("SELECT * FROM userfolders WHERE username=\'" + userName + "\'");
That resultset would contain the first record.  But I can't seem to grab the data. Below is a sample of my code that I think pertains to my problem.  If anybody has any ideas I would appreciate them
resultSet = statement.executeQuery("SELECT * FROM userfolders WHERE username=\'" + userName + "\'");
   dFolder = resultSet.getString("folder");
   dModule = resultSet.getString("dmod");
   dModulePath = resultSet.getString("dmod_path");
 
Thanks,
Kevin

Reply via email to