Quantcast
Viewing all articles
Browse latest Browse all 2341

New Post: OGR2OGR Use with database driver

Hi! I'm trying to convert a DXF file into MSSQL using the ogr2ogr method from the class Utils with no results. Using ogr2ogr directly from console works correctly, so there is no problem with the dxf file or the database. In this case, the command I've used is:
ogr2ogr -overwrite -f MSSQL "MSSQL:server=.\SQLEXPRESS;trusted_connection=yes;database=testdb " C:\test.dxf
And the C# code is:
var path =@"C:\\test.dxf";
var dest = @"MSSQL:server=.\SQLEXPRESS;trusted_connection=yes;database=testdb ";
var opc = "-overwrite -f MSSQL";
utils.OGR2OGR(path, dest, opc, null);
Where should I declare the driver to use? In the bstrDstFilename or in the bstrOptions string? Could you provide me an example?

Thanks in advance

Viewing all articles
Browse latest Browse all 2341

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>