1

This question uses Microsoft Indexing Services (Dialect 2) and IixssoQuery interface of the Cisso.dll interop library from a C#/.NET program.

There are columns in our index defined as the vt_i8 data type (8 bytes) however the CreateRecordSet method of the interop library always returns a RecordSet having numeric columns of 4 byte integers, truncating anything above the 2,147,483,648 range limit.

Ideally we need to pull C# long System.Int64 (8 bytes) instead of C# int System.Int32 (4 bytes) from the interop library.

The following code sample (mainly provided to jog memories) uses Cisso.dll to get a recordset and fill a DataTable, returning the datatable with truncated integers.

CissoQueryClass cqc = new Cisso.CissoQueryClass();
RecordSet rs = new RecordSet();
cqc.Columns = "Rank, DocTitle, VPath, Filename, Characterization,Write";
// ... setup ...
var myDs = new DataSet();
oldDbAdapter.Fill(myDs, cqc.CreateRecordSet("nonsequential"), "IXResults");
return myDs;

We tried the cqc.DefineColumn(..) method, playing with data types, etc. but to no avail - no change is seen in behaviour of truncated integers.

I want to know if this integer truncation is a limitation of the CISSO interop library, or if larger integer values can be pulled from it and we just don't know how to do it?

I'm sure somebody around here must have run into a similar issue. Googling the Internet this time around is very short on detail.


We have found a workaround based on the data inside the index: we're able to pull what we need from a another string field and parse out the number from it. Not ideal but a workaround.

John K
  • 28,441
  • 31
  • 139
  • 229
  • Are you writing for Win2000 clients and earlier? The reason I ask is this was is I noticed that it was depreciated with XP. – Ritch Melton Mar 05 '11 at 08:28
  • It's because a product we're using - Ektron http://www.ektron.com/ - is based on the deprecated technology, and we need to work with it. – John K Mar 05 '11 at 18:12
  • That sucks. I have some details, and I'm working on an answer, but I needed to create an XP VM. Its taken quite a bit of free time, but its a good puzzler. – Ritch Melton Mar 06 '11 at 01:45
  • Sounds promising. At least there's 50 points at stake which hopefully makes hard work worthwhile. – John K Mar 06 '11 at 22:15
  • did you try the Cisso.CissoQueryExClass as well ? – ralf.w. Mar 08 '11 at 19:08
  • We didn't try CissoQueryExClass. – John K Mar 08 '11 at 19:12
  • I think, oldDbAdapter.Fill() goes wrong here. Did you inspect the values from a single CreateRecordSet(..) - call ? – ralf.w. Mar 08 '11 at 19:15
  • We inspected the values at many levels: Cisso, OLEDB and .NET. It seemed to us Cisso boundary is where the 4 byte limit was enforced or originated from. If somebody can come up with a more definitive answer or proof or workaround for the 4 byte limitation we've experienced, then they chance to receive the bounty. I'm interested to see if anybody comes up with anything from their own research. – John K Mar 08 '11 at 19:45
  • I suppose you tried the DBTYPE_I8 jazz in your DefineColumn call tests? like what's shown here (another context but same idea): http://msdn.microsoft.com/en-us/library/dd582939(office.11).aspx – Simon Mourier Mar 09 '11 at 18:19
  • Yes, we did play the various types and GUIDs although I didn't keep track of what produced the end result. All I remember is we couldn't get it to not truncate. – John K Mar 09 '11 at 18:35
  • What is your OS version & CLR version? VT_I8 is not quite a valid VARIANT type (http://msdn.microsoft.com/en-us/library/ms221170.aspx), and is surely not supported an every platform. – Simon Mourier Mar 10 '11 at 09:39
  • We were on a 32-bit Windows 2003 platform when this problem came up, .NET 3.5 project. – John K Mar 10 '11 at 15:45
  • Just bumping this question to see if anybody has been able to prove the 4-byte integer is a limit, or if there is code that shows how it can be overcome. Only 10 hours remaining - I'd hate to see the bounty lost. – John K Mar 11 '11 at 17:43

1 Answers1

0

Yea, I'm stuck as you are. It seems like the max OLE DB column length is a ULONG on 32 bit(oledb.h), but the ixsso implementation treats as signed. I first thought I could get at the table schemas by mounting the datasource in the Database Connections of VS. That's when i discovered the "custom" query capabilities of the search. So much for that route.

I then tried walking the .net RCW down to the implementation, but I couldn't find debug symbols for the ixsso.dll, so I couldn't get a small enough asm block to diagnose.

The best guess is that the DefineColumns (raw COM interface) functionality is limiting the value to the underlying schema store, and that there's nothing you can do about it. Which is what you'd already deduced, and for similar reasons.

Good luck. Sorry we couldn't crack this. I'm glad its depreciated though....

Ritch Melton
  • 11,498
  • 4
  • 41
  • 54