aspose file tools*
The moose likes JDBC and the fly likes exception I got java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]COUNT field incorrec Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "exception I got java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]COUNT field incorrec" Watch "exception I got java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]COUNT field incorrec" New topic
Author

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

Senthil Kumar Murugan
Greenhorn

Joined: Jun 28, 2009
Posts: 4
help me to fix this error
exception is
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect
my code is


MS
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3838

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 ?


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3838

And Welcome to JavaRanch
Senthil Kumar Murugan
Greenhorn

Joined: Jun 28, 2009
Posts: 4
thanks ,

table has 6 fields, title ,link, description,guid,date,channel
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3838

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

Joined: Jun 28, 2009
Posts: 4
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

Joined: Dec 24, 2009
Posts: 7
first move the the steps like loading the driver and connection establishment and closing the connection
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: exception I got java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]COUNT field incorrec