Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

exception I got java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]COUNT field incorrec

 
Senthil Kumar Murugan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
help me to fix this error
exception is
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect
my code is

 
Vijitha Kumara
Bartender
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have few issues with your code. You are loading the driver inside the loop, those loading, getting the connection should move out of the loop first (It's not an error but it's not good at all). And what are the fields and their types of the table ?
 
Vijitha Kumara
Bartender
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And Welcome to JavaRanch
 
Senthil Kumar Murugan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks ,

table has 6 fields, title ,link, description,guid,date,channel
 
Vijitha Kumara
Bartender
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Senthil Kumar Murugan wrote:table has 6 fields, title ,link, description,guid,date,channel

So have you matched the types of columns in to the corresponding types when inserting? I see you assume all are VARCHAR type ?
 
Senthil Kumar Murugan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vijitha Kumara wrote:
Senthil Kumar Murugan wrote:table has 6 fields, title ,link, description,guid,date,channel

So have you matched the types of columns in to the corresponding types when inserting? I see you assume all are VARCHAR type ?



I am using ms access , and every field is of the text type only
 
krishnama raju
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
first move the the steps like loading the driver and connection establishment and closing the connection
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic