ODBC SQL Server Driver: Database is invalid or cannot be accessed. State ID: HY024

I can login to the database fine (SQL windows login), but when trying to upload a licence and I get the above error. (I think I have seen this error somewhere else before?). I have the same database on another SQL environment with no problems at all.

I suspect this is because I have not installed NAV (4 SP2) on the SQL server itself and so maybe its the MDAC?

Background: Recently upgraded the CSide (client) application from 3.70A to 4.02.

Any ideas, thought this would be a good place to put the HY024 error code on this site

Are you sure your license is enabled to work with a 4.02?
Even if you do only a technical upgrade, your license must be enabled for the new version.

The Licence works with my DEV database on another SQL box with a “mirrored” Setup. I changed to SA login it works, which seems strange to me because I don’t have to be in SA mode to do it on the other environment.

Another strange thing that is happenning is when viewing the Permissions table: the Object ype field should have the following types: Table Data, Table, Form, Report, Dataport,CodeUnit, XMLPOrt, Menusuite, System. But mine is missing XMLPort & Menusuite?

This seems to be the license for a 3.70 or lower DB.

After much searching, eventually found the problem with the Object Type option list not being correct:

Table 2000000005 Permission appears to have not been upgraded correctly by opening 3.7 databse with 4.02 client. The Obejct Type option string was correct (Table Data,Table,Form,Report,Dataport,Codeunit,XMLport,MenuSuite,System), however the OptionCaption field and OptionCaptionML did not match. hmmmmm [:^)].