configSDK | try to create person ... And got a problem

Hello Everybody,
I have been spending hours and hours trying the .net SDK. I am ma newbie with it and it is very very difficult to find informations :-[

I am trying to create a person and the conf server always reply me .

10:22:07.422 Trc 04541 Message MSGCFG_ADDOBJECT received from 372 (SCE ‘default’)
10:22:07.422 Std 23500 Configuration Server Error : Error [CFGObjectPackingError], object , property [Unknown] Description Failure to unpack the attribute [DBID], type : [CfgPerson], DBID : [0]
10:22:07.422 Trc 04542 Message MSGCFG_ERROR sent to 372 (SCE ‘default’)

MSGCFG_ERROR
attr: IATRCFG_ERRORCODE value: 25
attr: SATRCFG_DESCRIPTION value: “Failure to unpack the attribute [DBID], type : [CfgPerson], DBID : [0]”
attr: IATRCFG_REQUESTID value: 4[/color]

The xml I use is below. I found here a topic about this but that DBID problem makes me crazy.
Would someone have an idea about this ?

XmlReader reader = XmlReader.Create( “d:\coucou.xml”);
System.Xml.Linq.XDocument doc;
RequestCreateObject requestCreateObject = RequestCreateObject.Create((int)CfgObjectType.CFGPerson, doc);
IMessage msg = protocol.Request(requestCreateObject);

<?xml version="1.0" encoding="utf-8" ?>

Hi,

Try using the Config Object Model (COM) Application Block, it is much easier than trying to form the xml.


                CfgTenantQuery qTenant = new CfgTenantQuery();
                qTenant.Dbid = 1;
                CfgTenant tenant = confService.RetrieveObject<CfgTenant>(qTenant);

                CfgPlaceQuery pQuery = new CfgPlaceQuery();
                pQuery.Dbid = 1361;
                CfgPlace place = confService.RetrieveObject<CfgPlace>(pQuery);


                CfgPerson myPerson = new CfgPerson(confService);
                myPerson.FirstName = "My";
                myPerson.LastName = "Name";
                myPerson.EmployeeID = "001";
                myPerson.EmailAddress = "[email removed]";
                myPerson.UserName = "001";
                myPerson.Tenant = tenant;
                myPerson.IsAgent = CfgFlag.CFGTrue;
                myPerson.Save();
                myPerson.AgentInfo.Place = place;
                myPerson.Save();

great ! i am unlocked. :smiley: thanks a lottt