How to Save Shapefiles (.shp) in Microsoft SQL Server 2017 via VB.NET code? RRS feed

  • Question

  • Hi !

    I got stuck with working with spatial data in Microsoft SQL server! 

    How to  accomplish the task of saving shapefiles (.shp) into Microsoft SQL Server (by writing VB.NET code in visual studio ).

    I have tried using the tool so called Shape2Sql by the way this tool works fine, however, i want to do it manually by writing some code in visual studio to implement  this task.

    Such code should allow user browse for individual shapefiles from  PC and  then when user  clicks the save button,validate the selected shapefile  and then if validation returns true then the selected shapefile should be saved to a specified SQL Server database. 

    I try reading different literature's but cant grasp what to do,



    Monday, July 22, 2019 3:40 PM

All replies

  • Hi C.Mligo,

    I find a similar thread--How can i store geographic files such as shapefile (.shp) in SQL Server database?

    Hope it could help you.

    Best regards,
    Cathy Ji

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to  MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Tuesday, July 23, 2019 2:08 AM
  • Thanks Cathy Ji,

    The thread you mentioned in the hyperlink was posted by me.

    I decided to modify it and post it again because i still don't grasp what to do from those reply so  that's why i'm looking for anyone assist write such code. If you can do so please assist me and thank you.


    Tuesday, July 23, 2019 5:58 AM