Mapxtreme与Spatialware连接

MIConnection conection = new MIConnection();
            conection.Open();
            string strConDB = "server=local;database=guangxi;uid=sa;pwd=sa;DLG=0";
            string strSelect = "select * from newplanting";
            TableInfoServer ti = new TableInfoServer("newplanting",
                    "DRIVER={SQL SERVER};" + strConDB,
                    strSelect, ServerToolkit.Odbc);
            ti.CacheSettings.CacheType = CacheOption.On;
            MapInfo.Data.Table tabServer;
            tabServer = conection.Catalog.OpenTable(ti);
            mapControl1.Map.Load(new MapInfo.Mapping.MapTableLoader(tabServer));

         
            conection.Close();

你可能感兴趣的:(sql,SQL Server)