Hi..!
I'm making a jsp that access a database...
This is my code:
<html>
<%@page import="java.sql.*" %>
<%@page import="javax.sql.*"%>
<%@page import="java.io.*" %>
<%
try{
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection cn=DriverManager.getConnection("jdbc:microsoft:sqlserver://192.168.0.8:1433;databasename=my_db;user=<my_user>;password=<my_passwd>");
Statement st=cn.createStatement();
ResultSet rs=st.executeQuery("SELECT * FROM tbl_bancos where id_bancos='" + request.getParameter("idbanco") + "");
}catch (Exception e){System.err.println(e.getMessage());}
%>
<more_html>
....
</more_html>
//Here is my problem:
The Name of the bank is: <%=rs.getString("nombre_banco")%>
I'm getting the following error on the last line:
cannot resolve symbol [javac] symbol : variable rs
And I don't understand why, 'cause already declared the rs variable...
any help would be appreciated...thanks in advance..
regards,
-eduardo s.m.