{{theTime}}

Search This Blog

Total Pageviews

Java.sql.SQLException: Invalid column Index


"java.sql.SQLException: Invalid column index" is a frequent error while working in Java Database Connectivity (JDBC). As the name suggests "Invalid column index" its related to accessing or setting column in your SQL Query using prepared statement in Java. I have seen "java.sql.SQLException: Invalid column index" coming mostly due to two reason:

1) Setting column data using setXXXX(int coloumIndex) e.g. setInt(0) setString(0)
2) Getting column data using getXXX(int columnIndex) e.g. getInt(0) getString(0)
 

No comments:

Generate Models from SQL Server using Entity Framework Core

To generate models from SQL Server database tables using Entity Framework (EF) in .NET, you can follow the Database-First approach with Ent...