Implementing a SQL Server 2008 User-defined function in managed code for geocoding

By : nkav

The goal:
To create a .NET dll i can reference from inside SQL Server where i can pass in an address & get back a geocode string that i can stick into a geography data type as a POINT using STPointFromText() in t-SQL.

I'm using Virtual Earth, I signed up for a developer account which gave me access to virtual earth staging servers.

I'm trying to create a user defined function in a similar way to the example shown here although using Visual Studio 2008 of course. I have code that I've written in ASP.NET that uses virtual earth to pass in an address & get back the latitude/logditude co-ordinates.

The problem:
The only problem is that virtual earth requires you to 'add a service reference' for the geocode service and for some reason when i go to the project menu there's Add Reference and Add Web Reference, but no Add Service Reference which is what i need to be able to call geocodeService.Geocode(geocodeRequest) which does all the magic.

Can someone tell me what am i doing wrong? why is it not possible to add a service reference to a SQL Server project in visual studio?

By : nkav


Right click on the Sql Server Project, go to properties, make sure the target framework is set to .Net 3.5. My guess is its targetting the .Net 2.0 FW.

if you do need to stick to the 2.0 Framework, open the .svc link in a browser and extract the wsdl url, you can do an "Add Web Reference" instead

The's pre-complied python bindings for libsvn are a separate download. The latest as of Oct 27 could be found here.

There are other binary SVN distributions listed here, and they probably have different policy for bundling the python bindings.

As Michael said above Red Gate ANTS Profiler is an excellent tool for profiling your SharePoint code.

My post here shows how easy it is to get up and running, although you could argue that it is aimed at your specific code it is possible to test perf issues when things like large lists are populated. But if your into this area you not really looking for a profiler and more at load and scale testing.

Hope this helps.


This video can help you solving your question :)
By: admin