I write JSP , I have write a file connection , it has to use anny other pages. but I have to error:
java.sql.Connection conn = null;
java.sql.Connection getDBQuestCon()
{
try
{
if(conn == null || conn.isClosed())
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"
conn = DriverManager.getConnection("jdbcdbc:quest2001" , "quest2001" , "quest2001"
}
}
catch(Exception e)
{
System.out.println(e);
}
return conn;
}
Connect to JDBC(in SQL-SERVER)
I don't know when I get if(conn == null || conn.isClosed())
have to error:
java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt
java.lang.NullPointerException
please help me.
Trungx
java.sql.Connection conn = null;
java.sql.Connection getDBQuestCon()
{
try
{
if(conn == null || conn.isClosed())
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"
conn = DriverManager.getConnection("jdbcdbc:quest2001" , "quest2001" , "quest2001"
}
}
catch(Exception e)
{
System.out.println(e);
}
return conn;
}
Connect to JDBC(in SQL-SERVER)
I don't know when I get if(conn == null || conn.isClosed())
have to error:
java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt
java.lang.NullPointerException
please help me.
Trungx