AnsweredAssumed Answered

ESRI GeoDatabase issue - non-issue for New ShapefileWorkspaceFactory keyword

Question asked by cgraham on Sep 5, 2012
Latest reply on Sep 6, 2012 by cgraham
Good Afternoon,
I was getting a "user-defined type not defined" error at compile time on the following line:

Dim pWSF as IWorkspaceFactory2 set pWSF = New ShapefileWorkspaceFactory

When I looked at IWorkpaceFactory2 in help it says it is in the esriGeoDatabase library.  I always had the reference to that library selected.  (I tried IWorkspaceFactory as well and got the same error).

I have many programs where I use this line, so I have opened a few of them and they compiled fine. 

After comparing the list of referenced libraries from the working and not working projects I found the one not working didnt have a reference to ESRI Editor EXT, ESRI GeoAnalyst, Microsoft ActiveX Data Objects 2.8, while the one that worked did.  Also the one that was not compiling had references to a bunch of libraries with GeoDatabase in the name, but the one that compiles did not.

I made the switches where necessary and now both compile.  BUT what library is the "shapefileworkspacefactory" keyword in, and why would it not be with the library that the associated object is in?  Finally, how did I figure this out before, and why has it not been an issue until now?  I am thinking the answer to my last question is more a case of just happening to need random other objects from the libraries I was not referring to until now...

If anyone has any ideas, comments, experience on this  I'd love to hear them.  Especially if you know a more effeicent troubleshooting routine.

Take care,

ArcGIS 9.3.1 with networked license server (ArcINFO license, most ESRI extensions available)
VB 6.0
Windows XP Pro 32bit