In the piece of code below I'm getting an SQL error I can't understand:// discover if the legal person already exists in the databasestep = new String("looking for LegalPerson - before prepare");anSQL = new String("select count(*) from lp "+ "where taxid_root = ? "+ "and type = ?");aStmt = aConnex.prepareStatement(anSQL) ;tempTaxID = embryo.getBranchTaxID();tempRoot = tempTaxID.getRootNumber(); // is equal to (int)58890252aStmt.setInt(1, tempRoot); // sets the parameter to (int)58890252aStmt.setString(2, "J");aResult = aStmt.executeQuery();int numLPs = aResult.getInt(1);This is the error I get, when the last line is executed:*** SQLException caught ***looking for LegalPerson - before executeMessage: No current rowSQLState: IX000Vendor: -79739java.lang.NullPointerExceptionat legalPersonManagement.TesterLPManager.main(TesterLPManager.java:52)at symantec.tools.debug.MainThread.run(Agent.java:48)The expected result was to get (int) 1, because there is a register in thetable that matches my select criteria... Does anybody know what this errormeans and how to circumvent it? I've checked the JDBC api, the InformixJDBC programmer's guide, etc...I'm using JDK 1.1 (VisualCaf?3, jdk 1.1.7) with Informix JDBC 1.5. I'mdebugging in Win32 (in VisualCaf? and the database server is InformixDynamic Server 7.30 UC6 running on HP-UX 10.20.Any help will be greatly appreciated. Best regards,Fabio Luis De <!-- e --><a href="mailto[email protected]">[email protected]</a><!-- e --> Consultant for Ops/CSDHL Worldwide Express, GRU-CO, Brazil