I have the next problem. I want to make a little translation program, I have in access a table that has two columns Español and Frances.
I'm using a JtextBox to introduce a spanish word, for example ROJO, and I want to retrieve the french word rouge.
The query sentence shows me the last word in Frances. I have the following structure:
Español Frances
rojo rouge
negro noir
and this is the code
try
{
String ruta = "C:\\dicc.mdb";
String referencia = "jdbc

dbc:MS Access Database;DBQ="+ruta;
//Levantar controlador o carga el controlador
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conecta = DriverManager.getConnection(referencia);
Statement s = conecta.createStatement();
ResultSet rs = s.executeQuery("SELECT Español, Frances FROM espfran =");
while(rs.next())
{
res=rs.getString("Frances");
}
jLabel.setText(res);
conecta.close();
}
catch(Exception jl)
{
JOptionPane.showMessageDialog(null,jl.getMessage() );
}
Hope someone can help me. please email me @
lemurianredmage@hotmail.com