07-15-04 12:51 PM
I've been trying and trying to get the Cisso object to return a
Recordset that
I can cast into and ADODB.RecordSet but continually recieve the
following error:
"System.Runtime.InteropServices.COMException: Unspecified error" on
the very line you are questioning (ADODB.Recordset rsIX =
(ADODB.Recordset)cqc.CreateRecordset("nonsequential");)
I've included all the relevant references and the only error seems to
be when I am trying to cast into the ADODB.RecordSet (have the same
error when I cast into object too)
Any ideas where we may be going wrong?
...
using Cisso; // COM REF ixsso Control Library (Indexing services)
using ADODB; // COM REF Microsoft ActiveX Data Objects 2.7 Library
//have tried with 2.8 Library
...
private DataSet PerformQuery(string strText, int nMaxResults, string
CiScope, string CiCatalog) //note 'std' IS naming used
{
Cisso.CissoQueryClass cqc = new Cisso.CissoQueryClass();
cqc.Catalog = CiCatalog;
cqc.MaxRecords = nMaxResults;
cqc.CiScope = CiScope;
strText.ToString().Trim().Replace(";", "");
string strQuery = "NOT CONTAINS(VPath, '_vti_' OR '.config')";
strQuery += " AND (CONTAINS('" + strText.ToString() + "') OR
CONTAINS(DocTitle, '" + strText.ToString() + "') OR CONTAINS(title, '"
+ strText.ToString() + "'))";
cqc.Query = strQuery;
cqc.Columns = "Rank, DocTitle, VPath, Filename, Characterization,
Write";
//cqc.DefineColumn("title (DBTYPE_WSTR) =
d1b5d3f0-c0b3-11cf-9a92-00a0c908dbf1 title");
//cqc.DefineColumn("testFileTime (VT_FILETIME) =
d1b5d3f0-c0b3-11cf-9a92-00a0c908dbf1 testFileTime");
cqc.SortBy = "Rank[d]";//, title[a]";
ADODB.Recordset rsIX =
(ADODB.Recordset)cqc.CreateRecordset("nonsequential");
OleDbDataAdapter daConvertToDataset = new OleDbDataAdapter();
DataSet myDS = new DataSet();
daConvertToDataset.Fill(myDS, rsIX, "IXResults");
return myDS;
}
[ Post a follow-up to this message ]
|