Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a Network Analyst routine that worked for 9.3 and does not work with 10. I was closely following the example at: http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/How_to_create_a_network_dataset/0001000000w7000000/

It bombs when it gets to the line that actually creates the Network Dataset:

INetworkDataset networkDataset = (INetworkDataset)datasetContainer2.CreateDataset(deDataset);

Did something change that would cause these objects (used with Network Analyst) to not work the same way?

This is the exact error message:

System.Runtime.InteropServices.COMException was unhandled Message=Exception from HRESULT: 
0x8004228E Source=ESRI.ArcGIS.Geodatabase ErrorCode=-2147212658 StackTrace: at 
ESRI.ArcGIS.Geodatabase.IDatasetContainer2.CreateDataset(IDEDataset DataElement) at 
NetAnalystTestApp.MainForm.PutRoadLayerOnMap() in C:\@ALPACAS\AlpacasCT\experimental\network 
routing\NetAnalystTestApp\NetAnalystTestApp\MainForm.cs:line 352 at 
NetAnalystTestApp.MainForm.MainForm_Load(Object sender, EventArgs e) in 
C:\@ALPACAS\AlpacasCT\experimental\network 
routing\NetAnalystTestApp\NetAnalystTestApp\MainForm.cs:line 83 at 
System.Windows.Forms.Form.OnLoad(EventArgs e) at 
System.Windows.Forms.Form.SetVisibleCore(Boolean value) at 
System.Windows.Forms.Control.set_Visible(Boolean value) at 
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, 
ApplicationContext context) at 
System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, 
ApplicationContext context) at System.Windows.Forms.Application.Run(Form mainForm) at 
NetAnalystTestApp.Program.Main() in C:\@ALPACAS\AlpacasCT\experimental\network 
routing\NetAnalystTestApp\NetAnalystTestApp\Program.cs:line 39 at 
System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at 
System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] 
args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at 
System.Threading.ThreadHelper.ThreadStart_Context(Object state) at 
System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback 
callback, Object state, Boolean ignoreSyncCtx) at 
System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback 
callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException:

Thanks, Renee

share|improve this question

closed as too localized by whuber Aug 15 '12 at 14:21

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

3  
Is your routine a standalone exe? If so, the license initialization changed at 10.0. –  Kirk Kuykendall Feb 10 '11 at 20:35
    
Please post the exact error message. –  James Schek Feb 12 '11 at 6:52
    
In response to James Schek, I accidentally posted the exact error message as an answer (below) and can't seem to delete it. –  user1929 Feb 23 '11 at 20:58
    
Geodatabase needs upgrading to v10? –  geographika Feb 24 '11 at 15:38
    
@Renee Is there an InnerException? –  Michael Todd Feb 24 '11 at 16:19