locked
Spatial types in VC++ RRS feed

  • Question

  • Hello,

    I have an app written in C++ with extern "C". I'd like to assemble spatial types to it without clr as it leads to many errors I can't solve.Is there any way to use these types in my app? I just want to read spatial database into C++ code and operate on two kinds of spatial types from SQL.  I would be really grateful for help...

    Regards,

    annie

    Thursday, December 16, 2010 7:01 PM

All replies

  • Hi annie,r86,

    I am doing research on it, if I have any idea, I will let you know as soon as possible.


    Regards,
    Tom Li
    Monday, December 20, 2010 7:09 AM
  • I have done some proof-of-concept work in using the unmanaged SqlServerSpatial.dll that is called by the .Net assemblies.  This test was done using C#, but I'm certain it would work in VC++.

    The good news: I was able to make my proof-of-concept project work after a lot of effort.

    The bad news: It would be a maintenence nightmare to make this ready for production, and I am certain this is well off of the "supported path" as far as MS is concerned, so you would be on your own.

    I had filed some Connect requests for a lower level api into this stuff a long time back.  I hope that it makes it way into the SQL2011 release.

    https://connect.microsoft.com/SQLServer/feedback/details/441783

    Monday, December 20, 2010 3:25 PM
  • Hi,

    I see in the Connect feedback, Goldie asks if there are specific methods that are of interest. Annie, could you go contribute to the feedback post with your suggested list?

    Also, you say you are experiencing "too many errors" when using CLR, what type of error are you struggling with?

    With respect to your seeking an ability to "read spatial [data]", we do offer the OGC extended method .ToString. Would .ToString fit your needs?

    Thanks,

    Cathy Miller

    Microsoft Online Community Support

    Tuesday, January 4, 2011 8:41 PM
    Answerer