Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

SQL Error Code 0 with JDBC

  Asked By: Vivek    Date: Nov 21    Category: Java    Views: 1145
  

I am using SQL Server. with JDBC. I am giving the code.

ResultSet rs=null;
Statement st=null;
Connection conn =null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
conn = DriverManager.getConnection("jdbc:odbc:backoffice","sa","du");
st = conn.createStatement();

sql="SELECT CATEGORY,Code,LoginName FROM WEB_LOGINS where Login='" +
request.getParameter("SelectedIndex") + "'";

rs=st.executeQuery(sql);
while(rs.next())
{
LoginCode=request.getParameter("SelectedIndex")
Category=rs.getString(1)
Code=rs.getString(2)
LoginName=rs.getString(3)
}


I am getting an error SQL Error 0;

What this mean. How can i solve it?

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on SQL Error Code 0 with JDBC Or get search suggestion and latest updates.




Tagged: