Top "Sqlexception" questions

An exception that is thrown when the database driver encounters an error.

ResultSet.getString(1) throws java.sql.SQLException: Invalid operation at current cursor position

When I run the following servlet: // package projectcodes; public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException { String UserID = …

java jdbc resultset sqlexception
How to throw a SqlException when needed for mocking and unit testing?

I am trying to test some exceptions in my project and one of the Exceptions I catch is SQlException. It …

.net asp.net-mvc moq sqlexception
java.sql.SQLException: Parameter index out of range (2 > number of parameters, which is 0)

public class Brothers extends javax.swing.JFrame { /** * declaring connection and SQL statement */ Connection cn; Statement st; PreparedStatement pstmt=null; PreparedStatement …

java sql exception sqlexception
How to catch SqlException caused by deadlock?

From a .NET 3.5 / C# app, I would like to catch SqlException but only if it is caused by deadlocks on …

.net sql-server-2008 deadlock try-catch sqlexception
Java Oracle localhost connection error (ORA-12505)

I am trying to currently connect to a database on my current computer. import java.sql.Connection; import java.sql.…

java database oracle exception sqlexception
Ambiguous column name error

When executing the following (complete) SQL query on Microsoft SQL Server 2000: SELECT B.ARTIFACTTNS, B.ARTIFACTNAME, B.ARTIFACTTYPE, B.INITIALBYTES, …

sql sqlexception
Exception java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0)

I'm getting this error: Exception java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0). java.…

java sql sqlexception
java.sql.SQLException: No database selected - why?

the last days I was trying to learn how to access mySQL databases via Java. I am able to load …

java mysql jdbc odbc sqlexception
java.sql.SQLException: No suitable driver found

I am trying to execute simple query using below DbQuery.java class which uses DbConnector to get a Connection from …

java jdbc sqlexception ocpjp