Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Error in row  RSS feed

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I was using the updatable resultset and trying to insert a new row into a Microsoft Access database using the following code

where sdf is an object of SimpleDateFormat class and br is an object of BufferedReader class wrapped around InputStreamReader class that wraps the System.in object.
When I execute the code, the following exception is thrown


java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]Error in row
at sun.jdbc.odbc.JdbcOdbcResultSet.setPos(JdbcOdbcResultSet.java:5068)
at sun.jdbc.odbc.JdbcOdbcResultSet.insertRow(JdbcOdbcResultSet.java:4018)
at StudentsData.main(StudentsData.java:129)


is this because the ODBC driver does not support insertion into the resultset ? Please help!!!
[ October 23, 2005: Message edited by: Bear Bibeault ]
 
author and iconoclast
Posts: 24203
40
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is certainly not a beginner question! Moving to our JDBC forum.
 
Ketan KC Chachad
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for shifting my query to the JDBC section but I would like to add on to my query and say that I tried updating an existing record and it gave me the same exception when I try updating the first record. But if move the cursor to a particular record using the absolute() method and then try updating the record values, the following exception is thrown


java.sql.SQLException: No data found
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6287)
at sun.jdbc.odbc.JdbcOdbc.SQLGetDataString(JdbcOdbc.java:3307)
at sun.jdbc.odbc.JdbcOdbcResultSet.getDataString(JdbcOdbcResultSet.java:
5494)
at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:342)
at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:399)
at StudentsData.main(StudentsData.java:138)


Please do help me with this error. Please!!!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!