On Mon, 14 May 2001 17:16:24 -0400, "Kevin Fonner"
<[EMAIL PROTECTED]> wrote:
>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...
Try...
resultSet rs = statement.executeQuery("select * from table where
column=data");
rs.next() // this outta do it for ya, each rs.next() advances the
cursor one row.
dFolder = rs.getString(1); // avoid using column names
>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
>
Richard Draucker
[EMAIL PROTECTED]
Protected-Data.Com
Remote Data Support For Web Developers