ODBC Driver Error RRS feed

  • Question

  • User-614943948 posted

    I am using Crystal Reports 9.0. I have created System DSNs to connect the Crystal Reports with SQL Server 2008. It is working fine in one PC but with another PC I am facing this issue.

    Logon failed.
    Details: IM014:[Microsoft][ODBC Driver Manager] The specified DSN
    contains an architecture mismatch between the Driver and Application
    Error in File C:\Windows\TEMP\rptWSRA
    Unable to connect: incorrect log on parameters.

    Although when I open Crystal reports directly I am able to connect with DSN, I am able to establish connection with the database, I am able to take tables, views anything of that database. I am able to import, I can preview, view relationship, see the query, in fact anything.


    But when I call the report from the C# source code. I am receiving the above mentioned error. And this works perfectly fine in one PC, its with the other PC, this issue is arising. Can someone help me in solving this issue?

    Thanks in Advance

    Friday, October 9, 2015 5:59 AM

All replies

  • User753101303 posted


    It seems the DNS definition is not correct. Sounds like a 32 vs 64 bit driver issue (ie an app running in 32 bit mode must use a 32 bit ODBC driver and an app runnning in 64 bit mode must use a 64 bit ODBC driver).

    Showing the connection string might help. Check in which mode your app is running for example using https://msdn.microsoft.com/en-us/library/system.environment.is64bitprocess(v=vs.110).aspx

    Friday, October 9, 2015 7:02 AM
  • User-614943948 posted

    The connectionstring will contain these lines.

    <add key="reportspath" value="D://Projects//NewGE3//REPORTS//CrystalReports//"/>


    <compilation debug="true">
    <add assembly="CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    				<add assembly="CrystalDecisions.Shared, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    				<add assembly="CrystalDecisions.ReportSource, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    				<add assembly="CrystalDecisions.Enterprise.Framework, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    				<add assembly="CrystalDecisions.Enterprise.Desktop.Report, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    				<add assembly="CrystalDecisions.CrystalReports.Engine, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    				<add assembly="CrystalDecisions.Enterprise.InfoStore, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    				<add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/></assemblies>

    This is an ASP.NET Application so how can I make out whether the process is running on 32-bit or 64-bit?

    The connection string for database connection. has nothing to do with the crystal reports.

    Friday, October 9, 2015 8:19 AM
  • User753101303 posted

    This is just  a path to a file.

    As pointed by "[Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application" this is really the DSN . More likely it is used by Crystal Report to get the data out of the db and this is where it fails according to me...

    Edit: ok, see the confusion, I meant of course the connection string configured for the DSN that fails, not the one used by your app.

    Friday, October 9, 2015 8:25 AM
  • User-614943948 posted

    So what is the solution to this? Will reinstalling Crystal Report work?

    Monday, October 12, 2015 1:29 AM
  • User753101303 posted

    No, see https://social.msdn.microsoft.com/Forums/sqlserver/en-US/702f0d9b-6cb9-49cf-9953-80d059711e60/the-specified-dsn-contains-an-architecture-mismatch-between-the-driver-and-application?forum=sqlgetstarted that confirms my suspicion.

    You are running on a 64 bit OS and the DSN you created is 32 (or 64) while your app runs in 64 (or 32 bits) mode. You'll have to delete the current DSN and create a new one (that above the proper version of the ODBC Driver Manager).

    Monday, October 12, 2015 4:25 AM
  • User-614943948 posted

    Oh thanks. Patric. So when I go to ODBC, can you suggest me how can I make sure that I create 32-bit ODBC not 64-bit? I create this DSN at compile time, not run time.

    Monday, October 12, 2015 5:57 AM
  • User753101303 posted

    Explicitely launch c:\windows\sysWOW64\odbcad32.exe which is the 32 bit version or c:\windows\system32\odbcad32.exe which is the 64 bit version (on a 64 bit system).

    Not sure how it works since I don't have used a DSN since ages but I guess that it will only show the suitable drivers (ie the 32 bit version shows only 32 bits drivers and the 64 bits version shows only 64 bits version).

    So you'll likely have to launch both version (to delete the wrong DSN and to create a new one with the proper architecture).

    Monday, October 12, 2015 6:32 AM