newgiser2009

can't openworkspace

Discussion created by newgiser2009 on Sep 7, 2010
Latest reply on Sep 9, 2010 by newgiser2009
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ESRI.ArcGIS.NetworkAnalyst;
using ESRI.ArcGIS.esriSystem;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.DataSourcesFile;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.Geometry;

namespace WindowsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            Initialize();
        }

        private void Initialize()
        {
            IFeatureWorkspace featureWorkspace;


            // Open GDB and NDS
            featureWorkspace = OpenWorkspace(Application.StartupPath + @"\..\..\..\..\..\Data\SanFranciscoNetwork") as IFeatureWorkspace;
           

        }

            public IWorkspace OpenWorkspace(string strGDBName)
        {
            IWorkspaceFactory workspaceFactory;
            workspaceFactory = new ShapefileWorkspaceFactory();
            return workspaceFactory.OpenFromFile(strGDBName, 0);
        }



        }

    }
above is my code,there is error:unexpected COMException,error from HRESULT:0x80040258 when running at line "return workspaceFactory.OpenFromFile(strGDBName, 0);"
please help me
thank you!
shirly

Outcomes