Hi guys,
I am currently trying to select a variable from my database and keep receiving error. Any suggestions?
at com.microsoft.sqlserver.jdbc.SQLServerException.ma keFromDatabaseError(SQLServerException.java:196)
I could swear that the SQL Statement is correct. Are there any jars I should be aware of? This same exact statement works in a different classpath. I am using Eclipse and JDK5.
Statement stmt = construct_db.createStatement();
String sqll ="SELECT TRANSACTION_ID FROM TRANSACTION WHERE JOB_ID="+this.getJobId();
ResultSet rs = null;
int transactionId = 0;
try{
stmt.executeQuery(sqll);
while(rs.next())
{
transactionId = rs.getInt("TRANSACTION_ID");
}
catch (SQLException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
}