on 08-16-2005 7:37 PM
We just upgraded to the first service pack for MDM 5.5, and I'm starting to write some Java to play with the repository. There appears to be a CatalogData.Login method that let's you specify a min/max number of pooled connections - very handy! However, there's an additional parameter called a 'region tag'. Does anyone know what this is?
The API documentation is woefully inadequate in this respect. Calling a parameter a 'region tag', and then indicating in the documention that a region tag is the region tag to use for the repository isn't that useful.
Specifying a blank region tag generates this exception:
a2i.core.StringException: No matching region tag
at a2i.common.CatalogData.LoadCatalogData(Unknown Source)
at a2i.common.CatalogData.Login(Unknown Source)
at com.xxx.dw.mdm.utils.ConnectionPool.getConnection(ConnectionPool.java:59)
Error code: 0x80000001 at com.xxx.dw.mdm.utils.Test.run(Test.java:26)
at com.xxx.dw.mdm.utils.Test.main(Test.java:21)
Error message : No message for RC (0x80000001)
So: what's a region tag?
That is the language and region you specify when you log in to the client tool.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ken
There are two language parameters which you can specify when working with the API:
1) The data language this is defined in the CatalogData.Login() function via the LanguageString/RegionTag parameter.
2) The schema language this is defined with the function CatalogData.SetCodeRegion(), and must be called before CatalogData.Login(). If no schema language is defined, the schema language defaults to the data language.
e.g. CatalogData.SetCodeRegion(English [US])
The implications of this are as follows:
1) The function GetName() of CMFieldInfo and CMTable info returns the data language name.
2) The new function GetCode() of CMFieldInfo and CMTableInfo returns the schema language name.
3) When referring to fields or tables by name, you MUST use the schema language name. For example, when adding field names to a ResultSetDefintion.
· NB. 1) The function CatalogData.Login() will fail with ReturnCode = 6 (BAD_DATA) if you set a schema language for which not all table and field names exist.
· NB 2) You cannot call CatalogData.SetCodeRegion() after logging into the catalog.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This code works:
<i>Catalog.Login("192.168.1.71", 2343, "Login", "pwd", "English [US]");</i>
So the region tag is the final parameter - <i>"English [US]"</i>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.