Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Where I work we have a website that just launched. In the site there is a school sorter function that uses Google Maps API to find schools in a given radius based on the zip code and search distance that worked initially. It is a stored procedure that references a function that defined in a C# CLR assembly. It was stored in a 32 bit SQL Server 2005 server. we have since upgraded to SQL Server 2008 R2 64 bit, and the assembly stopped working after the upgrade. when the function is called that references Google maps it always returns status code 0, which I think means the request is not being sent. I put the code on my laptop yesterday and started playing with it, and some how got it to work, but sadly I am not sure of what I did so I have created a new database and I am trying to recreate what I did to make it work. It was a setting change I know, I am just not sure which one... I would be eternally grateful for any help.
Posted 1-Jun-11 3:52am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

It sounds to me that the assembly is compiled for 32 bit (x86) platform and therefor cannot be used by the 64bit Sql Server.
 
Open the solution that contains the C# CLR assembly and right-click with your mouse on the solution. Select 'Configuration Manager'.
 
Here you'll see what platform is used to compile. In your case I think it will read x86. Change the platform to x64 and recompile the assembly.
 
Delete the assembly from SQL Server and add the recompiled assembly.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 215
1 George Jonsson 175
2 Kornfeld Eliyahu Peter 159
3 PIEBALDconsult 110
4 Richard MacCutchan 85
0 OriginalGriff 6,080
1 DamithSL 4,648
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,624
4 Sergey Alexandrovich Kryukov 3,294


Advertise | Privacy | Mobile
Web04 | 2.8.141220.1 | Last Updated 1 Jun 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100