I'm baffled. The Access table is called 'test', and there is only one column called 'name' of type 'Text'. I've found that it doesn't matter whether there's a primary key or not, or what type of column I use, or whether it's auto-numbered or not. Here's the piece of code that's killing me:
I've also tried it with a standard Statement with no luck. Any help please?
Originally posted by Jamie Robertson:
I have seen this problem extensively with certain combinations of the jdbc dbc bridge and MSAccess. Stop pulling your hair out, there are 2 workarounds to force this last record to insert:
1) Close the connection each time afterwards.
2) Do a dummy select each time afterwards. That seems to be the better one.
That means: after your last insert (not after each record) do this "trick".(after "insert into emp..." execute a query "select something from emp...) Not sure if the select has to be from the same table as the insert, but you can try it both ways
[ October 05, 2004: Message edited by: Matthew Taylor ]
just a thought:
I think you'd not use a semi-colon IN the sql string.
and also try using executeUpdate instead:
[ October 05, 2004: Message edited by: Roberto Spier ]