Subject Re: very stupid error wtih firebird jdbc driver
Author fred.vlietstra
--- In Firebird-Java@yahoogroups.com, Roman Rokytskyy <roman@...> wrote:
>
> >> Do you know a trick to get the contains of the SQL statement after
> >> filling the statement.
> >
> > I don't think that is possible, but maybe someone else knows a
trick.
>
> It is not directly supported by JDBC driver, but try JdbMonitor:
>
> http://www.jdbmonitor.com/
>
> Roman
>

I have solved the problem.

You must provide the field with trailing spaces.

example I will get the "lidnr" 100 the field must have trailing spaces.
" 100".
So I must add the follwing shit to my class :

int len = lidNr.length();
String id = null;
switch (len)
{
case 1: id = " " + lidNr;
break;
case 2: id = " " + lidNr;
break;
case 3: id = " " + lidNr;
break;
case 4: id = " " + lidNr;
break;
case 5: id = " " + lidNr;
break;
case 6: id = " " + lidNr;
break;
case 7: id = " " + lidNr;
break;
case 8: id = " " + lidNr;
break;
case 9: id = " " + lidNr;
break;
case 10: id = lidNr;
break;

}
stmt.setString(++x, id);

But it works.

regards