IIS Index Server - Cisso and ADODB.Recordset casting (c# ideally but any other advice too) please!!

This is Interesting: Free IT Magazines  
Home > Archive > IIS Index Server > July 2004 > Cisso and ADODB.Recordset casting (c# ideally but any other advice too) please!!





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Cisso and ADODB.Recordset casting (c# ideally but any other advice too) please!!
Mark

2004-07-15, 7:51 am

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;
}
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com