Kevin,
 
There are 2 problems with your message.  First, this question is extremely off topic for this mailing list.  Second, you do not say what kind of errors and/or results you get by executing your current code.  You simply say you "can't seem to grab the data".  Not very helpful.
 
But since I hate it when people just scream "off topic"... Take a look at the api documentation for java.sql.ResultSet.next().  The next() method needs to be called before you start calling the get*() methods.
 
-Duck
-----Original Message-----
From: Kevin Fonner [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 14, 2001 5: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