-
Retrieve Data
i have a problem to retrieve my column data from the access database.
Access get the data in the database but is not return anything.
can anyone tell me how to retrive the data?
source code:
s.execute("INSERT INTO tableFaculty (FacultyName)VALUES "+" ('" + f.getFacultyName() + "')");
//Return the primary key
s.execute("SELECT @@IDENTITY");
ResultSet result = s.getResultSet();
int id= result.getInt(0);
s.execute("select * from tablefaculty where facultyname = "+ id);
//ResultSet result = s.getResultSet();
JOptionPane.showMessageDialog(null,"yes");
JOptionPane.showMessageDialog(null, result.getRow());
JOptionPane.showMessageDialog(null, result.getString(2));
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|