public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
IFeatureLayer flayer = null;
private void button1_Click(object sender, EventArgs e)
{
flayer = IWorkspaceFactory_OpenFromFile_Example_Access(@"E:\ArcGIS\SLFH_Vector.mdb");
axMapControl1.Map.AddLayer(flayer as ILayer);
axMapControl1.Refresh();
}
//IWorkspaceFactory OpenFromFile Example
//e.g., nameOfFile = "E:\\data\\english\\access\\canada\\canada.mdb"
public IFeatureLayer IWorkspaceFactory_OpenFromFile_Example_Access(string nameOfFile)
{
IFeatureLayer pFeatureLayer = null;
try
{
IWorkspaceFactory workspaceFactory = new ESRI.ArcGIS.DataSourcesGDB.AccessWorkspaceFactoryClass();
IFeatureWorkspace pFeatur
arcgis连接access mdb增、删、改、查
最新推荐文章于 2024-06-22 00:30:14 发布
本文详细介绍了如何使用ArcGIS连接到Access MDB数据库,进行创建(Create)、读取(Read)、更新(Update)和删除(Delete)操作。通过具体的步骤和示例代码,展示了如何处理按钮事件、异常以及对象和字符串操作,为GIS开发人员提供了一个实用的参考资料。
摘要由CSDN通过智能技术生成