1. Don Olliver
  2. SnapObjects
  3. Tuesday, 13 August 2019

I am attempting to connect a test WebAPI project to SQL Server 2017 using ODBC. It works, but only when using a 64-bit driver. Otherwise, the app generates "The specified dsn contains an architecture mismatch between the driver and application". Any suggestions for connecting using a 32-bit driver?

Thanks,

Don Olliver

Epic-Premier Inc.

Accepted Answer
Armeen Mazda Accepted Answer Pending Moderation
1
Votes
Undo

You will need to request a 32-bit only version of the SnapObjects framework from support or you need to deploy this to a 32-bit machine instead of 64-bit machine.  The framework on NuGet.org is compiled using "Any CPU" option, in which case if your underlying OS is 64-bit then the .NET framework will always run SnapObjects in 64-bit mode.  If SnapObjects is 64-bit mode then the bitness of your DB driver needs to match.

Another thing to keep in mind is when you deploy the C# Web API or assembly you created in PowerBuilder, you also need to compile that using 32-bit only option instead of "Any CPU" so that you can force your C# code to run in 32-bit mode on 64-bit Windows.

 

Comment
Thank you Armeen.



Don
  1. Don Olliver
  2. Wednesday, 14 August 2019
Hi Don;

FWIW: I would stay with the 64bit SS driver. It makes more sense performance wise and will be a lot less headache in the long run to maintain as new releases & fixes are published to the SnapObject framework.

Food for thought.

Regards ... Chris
  1. Chris Pollach
  2. Wednesday, 14 August 2019
I do agree with Chris... for C# server-side apps (e.g. C# Web APIs) it makes sense to go with Any CPU compilation option rather than force the app to run 32-bit on a 64-bit Windows Server.
  1. Armeen Mazda
  2. Wednesday, 14 August 2019
There are no comments made yet.
  1. Tuesday, 13 August 2019
  2. SnapObjects
  3. # Permalink
Logan Liu Accepted Answer Pending Moderation
0
Votes
Undo

Hi Don,

For SQL Server please use SnapObjects.Data.SqlServer (SQL Server database provider) instead of SnapObjects.Data.ODBC. ODBC is only supported for SQL Anywhere.

If you must use ODBC in .NET, please let us know the reason so we can consider this in the product roadmap?

Thanks,
Logan

Comment
There are no comments made yet.
  1. Friday, 16 August 2019
  2. SnapObjects
  3. # 1
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.