Compound index of integer ??
What I did for this is create a couple of definitions as follows
(these are c++ examples using mfc's CString, but you should be able to
work out a similar c# methodology).
// define tag and usage formats... filled with zeros. Spaces could
also be used...
#define COMP_ID_3_FORMAT "%010d%010d%010d"
#define COMP_ID_3_TAG_FORMAT
"STRZERO(%s,10)+STRZERO(%s,10)+STRZERO(%s,10)"
Then when I create my tag, I do:
Tag4info t4iTags(myCB4);
CString strTag;
strTag.Format(COMP_ID_3_TAG_FORMAT, "FIELD1", "FIELD2", "FIELD3");
t4iTags.add("MYTAGNAME, strTag, NULL, 0, 0);
// use t41tags when creating your index
When doing a search, I do the following:
CString szSearch; szSearch.Empty();
szSearch.Format(COMP_ID_3_FORMAT, nField1, nField2, nField3);
int rc = myTable.seek(szSearch);
Hope this helps...
Greg
|