Subject | Re: very stupid error wtih firebird jdbc driver |
---|---|
Author | fred.vlietstra |
Post date | 2009-02-12T14:43:36Z |
Mark,
this is the most likely cause. But if have tested the code using an
existing "lidnr". It must be something stupid.
Do you know a trick to get the contains of the SQL statement after
filling the statement.
Fred
--- In Firebird-Java@yahoogroups.com, "Mark Rotteveel"
<Avalanche1979@...> wrote:
this is the most likely cause. But if have tested the code using an
existing "lidnr". It must be something stupid.
Do you know a trick to get the contains of the SQL statement after
filling the statement.
Fred
--- In Firebird-Java@yahoogroups.com, "Mark Rotteveel"
<Avalanche1979@...> wrote:
>allen: http://www.gmx.net/de/go/multimessenger01
> Hard to say, most likely the given lidnr simply does not exist.
>
> Mark
>
> > The result set stays empty after exceuting the following code :
> >
> > private final static String SELECT_LID = "SELECT RECORD_ID,
> > LIDNR, NAAM, VOORLETTERS, TUSSENVOEGSEL," +
> > " STRAAT, NUMMER, POSTCODE, PLAATS, BGNUMMER
> > FROM LEDEN WHERE LIDNR = ?";
> >
> > public Leden getLid(String lidNr)
> > {
> > Connection c = null;
> > PreparedStatement stmt = null;
> > ResultSet rs = null;
> > int x = 0;
> > Leden lid = null;
> > try
> > {
> > c = getConnection();
> >
> > stmt = c.prepareStatement(SELECT_LID);
> > stmt.setString(++x, lidNr);
> > rs = stmt.executeQuery();
> >
> > while(rs.next())
> > {
> > lid = new Leden();
> > int i = 0;
> > lid.setRecord_ID(rs.getString(++i));
> > lid.setLidNr(rs.getString(++i));
> > lid.setNaam(rs.getString(++i));
> > lid.setVoorLetters(rs.getString(++i));
> > lid.setTussenVoegsel(rs.getString
> > (++i));
> > lid.setStraat(rs.getString(++i));
> > lid.setHuisNummer(new Integer
> > (rs.getInt(++i)));
> > lid.setToeVoeging(rs.getString(++i));
> > lid.setPostCode(rs.getString(++i));
> > lid.setPlaats(rs.getString(++i));
> > lid.setHoofdBewoner(convertToBoolean
> > (rs.getInt(++i)));
> > lid.setMedeBewoner(convertToBoolean
> > (rs.getInt(++i)));
> > lid.setSamenVoegCode(rs.getString
> > (++i));
> > lid.setBgNummer(rs.getString(++i));
> >
> > }
> >
> > }
> > catch (java.sql.SQLException e)
> > {
> > logger.errorLog(e.getMessage(), e);
> > }
> > finally
> > {
> > releaseJDBCResources(c, stmt, rs);
> > }
> >
> > return lid;
> >
> > no sql errors nothing. any idea ?
> --
> Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit
>