Solved

ERROR: [ODBC Microsoft Access Driver]COUNT field incorrect

Posted on 2002-07-08
6
647 Views
Last Modified: 2008-02-26
I am writing a conversion to convert approx 130 access databases to SQL.  I have already created my SQL db, build the application for the front end and have converted a few of the databases on a "1 at a time" basis.  To expedite the process, I have created a dynamic conversion.  Items involved are a table listing all of the access dbs that need converted, 2 sql statements needed to pull the necessary data to convert and the location of the db.  It works perfectly until I use the 2nd sql statement.  I am getting an ODBC error: COUNT field incorrect.  The baffling part is that I am not returning a count, and I am opening it in a recordset, so there is no mismatch of values & variables, or anything like that.  I know that it isn't my connection because the first statement (to the same db using the same connection) works fine.  

I cannot find ANY information anywhere within Microsofts "help" sites.  Please, if anyone has any ideas, please share.  This has been a 7 month project and is due to go live next Monday.  Without data, I'm hosed!  
Thank you so much!
0
Comment
Question by:MisConFit8
[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
6 Comments
 
LVL 12

Expert Comment

by:Wouter Boevink
ID: 7137892
Can you post the sql statements?
0
 

Author Comment

by:MisConFit8
ID: 7137908
Note: the ID is being attatched dynamically in the active server page.  
This is the "full" statement as displayed by a response.write in the application page:
Select [Invite Sent] as InviteSent, [Date Travel Form Rec'd] as TravelFormRcvd, [Arrival Date] as Arrival, [Depature Date] as Depature, [Date Survey Rec'd?] as SurveyRcvd, [Date Agreement Rec'd?] as AgreementRcvd, [Date Expense Report] as ExpenseRptRcvd, Attended, Comments, [Photo #] as PhotoNum, [Confirmation Sent Date] as CPacketSent, [Invitation Accepted] as InviteAccept, Guest1 as GuestName FROM Participants WHERE ID = 1

I have chopped this down by taking out many of the variables and adding back in one at a time.  It works fine until the 5th one is added to the statement.

I should also note that I have copied this right off of the response.write and ran it in the associated Access database and it executes without a problem.

Thank you!!!!!!!
0
 
LVL 8

Expert Comment

by:dovholuk
ID: 7139165
how are you opening the db's? are you linking to each table in each tb dynamically or are you "opening" each db through automation?

if you are using automation, are you sure that you're setting the db reference to nothing and closing it before resetting it? such as:

Dim a As Database

Set a = Workspaces(0).OpenDatabase("c:\a.mdb", , False)
a.close
Set a = Nothing

(assuming a reference to DAO or similar)

if you are linking the tables dynamically, how are you linking them? specific code would be nice to see.

if OTHER, what is the process you're following? can you outline it / post some code snippits???

cheers,

dovholuk
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
LVL 12

Expert Comment

by:Wouter Boevink
ID: 7139874
If you leave out the 5th select does it work?
Maybe the problem is with [date ........]
Try a select on [date ........] if this doesn't work try copying the database and renaming the [date .......] column and the do a select on the new column name again.

It doesn't solve your problem of converting 130 databases but than you know where the problem is.
0
 
LVL 54

Expert Comment

by:nico5038
ID: 7260154

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - PAQ'd and pts removed
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 7296325
Per recommendation, points NOT refunded and question closed.

Netminder
CS Moderator
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

728 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