This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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: 3816

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: 3816

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: 3816

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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: exception I got java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]COUNT field incorrec
 
Similar Threads
strange problem...help!!!!!
Syntax error in SQL
ERROR
creating virtual tables
Updating Problem