SnoBrdinRTiste

create geodatabase in arcsde for sql 2008 express?

Discussion created by SnoBrdinRTiste on Sep 14, 2011
Latest reply on Feb 18, 2013 by bkirchhoff
I've followed the c# code from this link here

// Create a data server manager object.
IDataServerManager pDataServerMgr = new DataServerManagerClass();
pDataServerMgr.ServerName = sdeServer;
pDataServerMgr.Connect();

// Open one of the geodatabases in the database server.
IDataServerManagerAdmin pDataSvrMgrAdmin = IDataServerManagerAdmin)pDataServerMgr;

if (pDataSvrMgrAdmin.IsConnectedUserAdministrator)
{
pDataSvrMgrAdmin.CreateGeodatabase("GDB_Polls", @"C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA\GDB_Polls.mdf", 25, "", 0);
IWorkspaceName workspacename = pDataSvrMgrAdmin.CreateWorkspaceName(sdeDb, "VERSION", "dbo.Default");
IName name = (IName)workspacename;
IWorkspace GDB_work = (IWorkspace)name.Open();
}


but when i run my solution and it gets to the line: pDataSvrMgrAdmin.CreateGeodatabase(...), it errors out with the com exception... Exception from HRESULT: 0x80040E14
initially, i got a LoaderLock error. Then i thought it might be a threading issue so I used a backgroundworker and then this error is what i keep getting now.

can someone shed some light on this issue?
thanks

Outcomes