?
Solved

COUNT Field Incorrect

Posted on 2003-03-12
17
Medium Priority
?
366 Views
Last Modified: 2008-03-10
I'm creating JSP's in which I can add/update/delete a record. It worked successfully for the first file Brand, but when I try to use that file and configure it for Category - it doesn't work and the console says that I have a:

SQLException: [ODBC Microsoft Access Driver] COUNT field incorrect

I searched in some old questions, and it said that a possibility was that perhaps field names are misspelled, but I double checked that and they are all spelled correctly. What could be the other possibilities?

I am using JSP w/MS Access DB and testing it on Apache Tomcat 4.0

Thanks.
0
Comment
Question by:dudette366
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 2
  • 2
  • +1
17 Comments
 
LVL 6

Expert Comment

by:TheAmigo
ID: 8125612
Can you post a copy of your SQL string?
0
 

Author Comment

by:dudette366
ID: 8125624
SELECT m.materialID, m.materialName FROM tblMaterial m WHERE m.materialID = ? ORDER BY m.materialName"

Oops sorry.. it's Material table not Category that's what I meant to type earlier
0
 

Author Comment

by:dudette366
ID: 8125629
SELECT m.materialID, m.materialName FROM tblMaterial m WHERE m.materialID = ? ORDER BY m.materialName"

Oops sorry.. it's Material table not Category that's what I meant to type earlier
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
LVL 6

Expert Comment

by:TheAmigo
ID: 8125837
Looks like a stray "m" before the WHERE.
0
 
LVL 5

Expert Comment

by:TheMek
ID: 8126856
That's an alias TheAmigo. Shouldn't be a problem, but you might want to check if the odbc driver has a problem with aliases by removing all references to the alias m.
0
 

Author Comment

by:dudette366
ID: 8128299
it should be a problem with aliases b/c i used it on another file and it worked with no problem. could it be anything else? b/c i haven't spelled anything incorrectly so I can't understand why it is giving me the error
0
 

Author Comment

by:dudette366
ID: 8130146
it should be a problem with aliases b/c i used it on another file and it worked with no problem. could it be anything else? b/c i haven't spelled anything incorrectly so I can't understand why it is giving me the error
0
 

Author Comment

by:dudette366
ID: 8132227
it should be a problem with aliases b/c i used it on another file and it worked with no problem. could it be anything else? b/c i haven't spelled anything incorrectly so I can't understand why it is giving me the error
0
 
LVL 5

Expert Comment

by:TheMek
ID: 8136040
if you output the built-up sql string and try to run that on the access database directly, does it work?
0
 
LVL 12

Expert Comment

by:nexusnation
ID: 8785631
Hi dudette366,
This question has been abandoned and needs to be finalized (101 days since last comment).

   You can accept an answer, split the points, or get a refund. Go to
   http://www.cityofangels.com/Experts/Closing.htm for information and options.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

nexusnation
EE Cleanup Volunteer for Microsoft Access
0
 

Author Comment

by:dudette366
ID: 8790301
I fixed the SQL statement as I had a typo.
0
 
LVL 12

Expert Comment

by:nexusnation
ID: 8790373
see http://www.cityofangels.com/Experts/Closing.htm#4 to close this Q yourself then.
0
 

Author Comment

by:dudette366
ID: 8791186
SELECT m.materialID, m.materialName FROM tblMaterial m WHERE m.materialID = ? ORDER BY m.materialName"

works. In my result set, I was requesting a field that wasn't included in the SQL statement which resolved the problem.
0
 

Accepted Solution

by:
dudette366 earned 0 total points
ID: 8797417
sorry for the confusion. what happened was - I had a typo in my java code which was requesting a field that I wasn't including in my SQL statement. so actually my sql statement was fine and my java was wrong which i corrected. sorry for all the confusion
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question