I'm still here plugging away. I'm pretty close...I think. Your explanation of the mappings helped greatly. I've gotten everything in my test app set, but when it runs, it produces the following error when the persistence broker calls it's init() method:
Exception Details: System.ArgumentException: An entry with the same key already exists.
Stack Trace:
[ArgumentException: An entry with the same key already exists.]
System.Collections.Specialized.ListDictionary.Add(Object key, Object value)
System.Collections.Specialized.HybridDictionary.Add(Object key, Object value)
AToMSFramework.CXMLConfigLoader.IConfigLoader_loadConfig(HybridDictionary& dbMap, HybridDictionary& clMap)
AToMSFramework.CPersistenceBroker.loadConfig(_IConfigLoader configLoader)
AToMSFramework.modPersistenceBrokerSingleton.getPersistenceBrokerInstance(String xmlfile)
AToMSFramework.CPersistenceBroker.init(String xmlfile)
AToMSFramework.CPersistenceBroker.init()
atomstest.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\atomstest\webform1.aspx.cs:25
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
My database has the following tables:
Table: tblDepartments
Column: OID
Column: createdDate
Column: modifiedDate
Column: name
Also, how can I specify were to locate the XML map?
Thanks for all you help!!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2003-10-27
Please forgive my previous post..I totally overlooked the database name parameter in the database setup portion of the XML and confused it with the actual name of the database. So I'm passed that, and on to the next error message:
Exception Details: System.ArgumentException: Argument 'Index' is not a valid value
Stack Trace:
[ArgumentException: Argument 'Index' is not a valid value.]
Microsoft.VisualBasic.Collection.get_Item(Object Index)
AToMSFramework.CXMLConfigLoader.getClassMap(XmlElement node)
AToMSFramework.CXMLConfigLoader.IConfigLoader_loadConfig(HybridDictionary& dbMap, HybridDictionary& clMap)
AToMSFramework.CPersistenceBroker.loadConfig(_IConfigLoader configLoader)
AToMSFramework.modPersistenceBrokerSingleton.getPersistenceBrokerInstance(String xmlfile)
AToMSFramework.CPersistenceBroker.init(String xmlfile)
AToMSFramework.CPersistenceBroker.init()
atomstest.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\atomstest\webform1.aspx.cs:25
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm still here plugging away. I'm pretty close...I think. Your explanation of the mappings helped greatly. I've gotten everything in my test app set, but when it runs, it produces the following error when the persistence broker calls it's init() method:
Exception Details: System.ArgumentException: An entry with the same key already exists.
Stack Trace:
[ArgumentException: An entry with the same key already exists.]
System.Collections.Specialized.ListDictionary.Add(Object key, Object value)
System.Collections.Specialized.HybridDictionary.Add(Object key, Object value)
AToMSFramework.CXMLConfigLoader.IConfigLoader_loadConfig(HybridDictionary& dbMap, HybridDictionary& clMap)
AToMSFramework.CPersistenceBroker.loadConfig(_IConfigLoader configLoader)
AToMSFramework.modPersistenceBrokerSingleton.getPersistenceBrokerInstance(String xmlfile)
AToMSFramework.CPersistenceBroker.init(String xmlfile)
AToMSFramework.CPersistenceBroker.init()
atomstest.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\atomstest\webform1.aspx.cs:25
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
My database has the following tables:
Table: tblDepartments
Column: OID
Column: createdDate
Column: modifiedDate
Column: name
Table: tblShifts
Column: OID
Column: createdDate
Column: modifiedDate
Column: comment
Column: dayOfWeek
Column: startTime
Column: endTime
Column: staffReq
Table: tblOID
Column: OIDVal
My XML map looks like this:
<?xml version="1.0" encoding="utf-8" ?>
<map>
<database name="sPersist" class="CMsSqlDatabase">
<parameter name="name" value="sparky" />
<parameter name="user" value="scheduleruser" />
<parameter name="password" value="scheduler" />
<parameter name="OIDTable" value="tblOID"/>
</database>
<class name="Department" table="tblDepartments" database="sPersist">
<attribute name="OIDValue" column="OID" key="primary"/>
<attribute name="CreatedDate" column="createdDate" timestamp="true"/>
<attribute name="ModifiedDate" column="modifiedDate" timestamp="true"/>
<attribute name="Name" column="name" find="true" proxy="true"/>
</class>
<class name="Shift" table="tblShifts" database="sPersist">
<attribute name="OIDValue" column="OID" key="primary"/>
<attribute name="CreatedDate" column="createdDate" timestamp="true"/>
<attribute name="ModifiedDate" column="modifiedDate" timestamp="true"/>
<attribute name="Comment" column="comment" find="false" proxy="true"/>
<attribute name="DayOfWeek" column="dayOfWeek" find="false" proxy="true"/>
<attribute name="StartTime" column="startTime" find="false" proxy="true"/>
<attribute name="EndTime" column="endTime" find="false" proxy="true"/>
<attribute name="StaffReq" column="staffReq" find="false" proxy="true"/>
</class>
</map>
Any suggestions on this? What have I done wrong?
Also, how can I specify were to locate the XML map?
Thanks for all you help!!
Please forgive my previous post..I totally overlooked the database name parameter in the database setup portion of the XML and confused it with the actual name of the database. So I'm passed that, and on to the next error message:
Exception Details: System.ArgumentException: Argument 'Index' is not a valid value
Stack Trace:
[ArgumentException: Argument 'Index' is not a valid value.]
Microsoft.VisualBasic.Collection.get_Item(Object Index)
AToMSFramework.CXMLConfigLoader.getClassMap(XmlElement node)
AToMSFramework.CXMLConfigLoader.IConfigLoader_loadConfig(HybridDictionary& dbMap, HybridDictionary& clMap)
AToMSFramework.CPersistenceBroker.loadConfig(_IConfigLoader configLoader)
AToMSFramework.modPersistenceBrokerSingleton.getPersistenceBrokerInstance(String xmlfile)
AToMSFramework.CPersistenceBroker.init(String xmlfile)
AToMSFramework.CPersistenceBroker.init()
atomstest.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\atomstest\webform1.aspx.cs:25
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
Hi Dave,
I introduced a slight error in a previous CVS update. Grab the latest version from CVS when you get a chance and you should be OK.
Sorry about that :-(
Richard.