Data type Mismatch

  • Hey folks.  I'm working with an access "application" that I inherited.  There seems to be a problem that has crept up "all of a sudden" where "no, we didn't change anything" comes into play. 

    Apparently they used to be able to sort a table ASC/DESC as needed, and now they can't.  whenever they do, they get a Type mismatch in expression error.  This is a text column that is part of a table/query lookup to another table. 

    There are more design issues than I can count at this point, and eventually I'll be rewriting this as an Adp or somesort of Web application, but I need to fix this now.

    Any ideas a) what exact code execute on a table when you try to sort it, does it actually run a SELECT ... FROM tblname ORDER BY...  OR does it do something else, and b) how I might try to find which record is causing me the type mismatch problems.

    Thanks.

    -Luke.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

  • Is this a straight Access table or a linked table to SQL Server?  I'm at a loss.

    Russel Loski, MCSE Business Intelligence, Data Platform

  • It's a straight access table.  I beleive there is a problem with the way that access is handling the join to a lookup table.  I cleared all of the records from the table and tried to sort the records that way and I'm still recevieng the error, so it would seem there's something strange with the join.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

  • Tried the old compact/repair?

    What happens if you copy those tables to a new access DB and rerun the query?

     

    Last resort.... tried recompiling the application?

  • Are the join columns compatible?  One isn't an integer and the other a string that contains numeric data (most of the time)?

    Russel Loski, MCSE Business Intelligence, Data Platform

  • I beleieve you hit the nail on the head.  Seems that was the issue.  they were joining two text columns using an int in one table and text in the other.  It's fixed now.

    Thanks for the quick replies guys.

    -Luke.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

  • Yeah right nothing's changed, I swear .

  • hence the "s in the original post.

     

    thanks again.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

  • Are you sure you didn't change that after the original question was posted?? 

    Are you sure nothing's changed??

    .

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply