I am trying the sample with my SQL Server CJPHUA-EVO610\MOC with table AtomTest. I am getting SQL Server not found or access denied error when calling init in pBroker. Here's my XML : <map> <database name="CJPHUA-EVO610\MOC" class="CMsSqlDatabase"> <parameter name="name" value="AtomTest" /> <parameter name="user" value="atomtest" /> <parameter name="password" value="password" /> <parameter name="OIDTable" value="OID" /> </database> <class name="CProduct" table="Products" database="CJPHUA-EVO610\MOC"> <attribute name="OIDValue" column="oid" key="primary" /> <attribute name="CreatedDate" column="CreatedDate" timestamp="true" /> <attribute name="ModifiedDate" column="ModifiedDate" timestamp="true" /> <attribute name="ProductCode" column="ProductCode" find="true" proxy="true" /> <attribute name="Name" column="Description" proxy="true" /> <attribute name="Cost" column="Cost" /> </class> <class name="CCustomer" table="Customer" database="CJPHUA-EVO610\MOC"> <attribute name="OIDValue" column="oid" key="primary" /> <attribute name="CreatedDate" column="CreatedDate" timestamp="true" /> <attribute name="ModifiedDate" column="ModifiedDate" timestamp="true" /> <attribute name="CustomerID" column="CustomerId" find="true" proxy="true" /> <attribute name="CustomerName" column="Description" proxy="true" /> <attribute name="ContactName" column="ContactName" /> <attribute name="Country" column="Country" /> </class> <class name="COrderHeader" table="OrderHeader" database="CJPHUA-EVO610\MOC"> <attribute name="OIDValue" column="oid" key="primary" /> <attribute name="CreatedDate" column="CreatedDate" timestamp="true" /> <attribute name="ModifiedDate" column="ModifiedDate" timestamp="true" /> <attribute name="OrderNo" column="OrderNumber" find="true" identity="true" proxy="true" /> <attribute name="Customer" /> <attribute name="CustomerOID" column="CustomerOID" /> <attribute name="OrderDate" column="OrderDate" /> <attribute name="OrderLines" /> </class> <class name="COrderLine" table="OrderLines" database="CJPHUA-EVO610\MOC"> <attribute name="OIDValue" column="oid" key="primary" /> <attribute name="CreatedDate" column="CreatedDate" timestamp="true" /> <attribute name="ModifiedDate" column="ModifiedDate" timestamp="true" /> <attribute name="LineNumber" column="LineNumber" find="true" proxy="true" /> <attribute name="Order" /> <attribute name="OrderOID" column="OrderOID" /> <attribute name="Product" /> <attribute name="ProductOID" column="ProductOID" /> <attribute name="Quantity" column="Quantity" /> </class> <association fromClass="COrderHeader" toClass="CCustomer" cardinality="oneToOne" target="Customer" retrieveAutomatic="true" deleteAutomatic="false" saveAutomatic="false" inverse="false"> <entry fromAttribute="CustomerOID" toAttribute="OIDValue" /> </association> <association fromClass="COrderHeader" toClass="COrderLine" cardinality="oneToMany" target="OrderLines" retrieveAutomatic="true" deleteAutomatic="true" saveAutomatic="true" inverse="false"> <entry fromAttribute="OIDValue" toAttribute="OrderOID" /> </association> <association fromClass="COrderLine" toClass="COrderHeader" cardinality="oneToOne" target="Order" retrieveAutomatic="false" saveAutomatic="false" deleteAutomatic="false" inverse="false"> <entry fromAttribute="OrderOID" toAttribute="OIDValue" /> </association> <association fromClass="COrderLine" toClass="CProduct" cardinality="oneToOne" target="Product" retrieveAutomatic="true" saveAutomatic="false" deleteAutomatic="false" inverse="false"> <entry fromAttribute="ProductOID" toAttribute="OIDValue" /> </association> </map>
Please advise
For MSSQL you need to include the server name parameter in the database declaration.
ie <database name="CJPHUA-EVO610\MOC" class="CMsSqlDatabase"> <parameter name="name" value="AtomTest" /> <parameter name="serverName" value="CJPHUA-EVO610\MOC"" /> <parameter name="user" value="atomtest" /> <parameter name="password" value="password" /> <parameter name="OIDTable" value="OID" /> </database>
Log in to post a comment.
I am trying the sample with my SQL Server CJPHUA-EVO610\MOC with table AtomTest. I am getting SQL Server not found or access denied error when calling init in pBroker. Here's my XML :
<map>
<database name="CJPHUA-EVO610\MOC" class="CMsSqlDatabase">
<parameter name="name" value="AtomTest" />
<parameter name="user" value="atomtest" />
<parameter name="password" value="password" />
<parameter name="OIDTable" value="OID" />
</database>
<class name="CProduct" table="Products" database="CJPHUA-EVO610\MOC">
<attribute name="OIDValue" column="oid" key="primary" />
<attribute name="CreatedDate" column="CreatedDate" timestamp="true" />
<attribute name="ModifiedDate" column="ModifiedDate" timestamp="true" />
<attribute name="ProductCode" column="ProductCode" find="true" proxy="true" />
<attribute name="Name" column="Description" proxy="true" />
<attribute name="Cost" column="Cost" />
</class>
<class name="CCustomer" table="Customer" database="CJPHUA-EVO610\MOC">
<attribute name="OIDValue" column="oid" key="primary" />
<attribute name="CreatedDate" column="CreatedDate" timestamp="true" />
<attribute name="ModifiedDate" column="ModifiedDate" timestamp="true" />
<attribute name="CustomerID" column="CustomerId" find="true" proxy="true" />
<attribute name="CustomerName" column="Description" proxy="true" />
<attribute name="ContactName" column="ContactName" />
<attribute name="Country" column="Country" />
</class>
<class name="COrderHeader" table="OrderHeader" database="CJPHUA-EVO610\MOC">
<attribute name="OIDValue" column="oid" key="primary" />
<attribute name="CreatedDate" column="CreatedDate" timestamp="true" />
<attribute name="ModifiedDate" column="ModifiedDate" timestamp="true" />
<attribute name="OrderNo" column="OrderNumber" find="true" identity="true" proxy="true" />
<attribute name="Customer" />
<attribute name="CustomerOID" column="CustomerOID" />
<attribute name="OrderDate" column="OrderDate" />
<attribute name="OrderLines" />
</class>
<class name="COrderLine" table="OrderLines" database="CJPHUA-EVO610\MOC">
<attribute name="OIDValue" column="oid" key="primary" />
<attribute name="CreatedDate" column="CreatedDate" timestamp="true" />
<attribute name="ModifiedDate" column="ModifiedDate" timestamp="true" />
<attribute name="LineNumber" column="LineNumber" find="true" proxy="true" />
<attribute name="Order" />
<attribute name="OrderOID" column="OrderOID" />
<attribute name="Product" />
<attribute name="ProductOID" column="ProductOID" />
<attribute name="Quantity" column="Quantity" />
</class>
<association fromClass="COrderHeader" toClass="CCustomer" cardinality="oneToOne" target="Customer"
retrieveAutomatic="true" deleteAutomatic="false" saveAutomatic="false" inverse="false">
<entry fromAttribute="CustomerOID" toAttribute="OIDValue" />
</association>
<association fromClass="COrderHeader" toClass="COrderLine" cardinality="oneToMany" target="OrderLines"
retrieveAutomatic="true" deleteAutomatic="true" saveAutomatic="true" inverse="false">
<entry fromAttribute="OIDValue" toAttribute="OrderOID" />
</association>
<association fromClass="COrderLine" toClass="COrderHeader" cardinality="oneToOne" target="Order"
retrieveAutomatic="false" saveAutomatic="false" deleteAutomatic="false" inverse="false">
<entry fromAttribute="OrderOID" toAttribute="OIDValue" />
</association>
<association fromClass="COrderLine" toClass="CProduct" cardinality="oneToOne" target="Product"
retrieveAutomatic="true" saveAutomatic="false" deleteAutomatic="false" inverse="false">
<entry fromAttribute="ProductOID" toAttribute="OIDValue" />
</association>
</map>
Please advise
For MSSQL you need to include the server name parameter in the database declaration.
ie
<database name="CJPHUA-EVO610\MOC" class="CMsSqlDatabase">
<parameter name="name" value="AtomTest" />
<parameter name="serverName" value="CJPHUA-EVO610\MOC"" />
<parameter name="user" value="atomtest" />
<parameter name="password" value="password" />
<parameter name="OIDTable" value="OID" />
</database>