i2dx Posted January 25, 2007 Report Share Posted January 25, 2007 Hi Folks, I am currenty trying to improve my ADO Toolkit, but I have reached a point, where I can't find a solution for this specific problem: The variant input "Restrictions" of the Invoke Node "OpenSchema" needs a special input which is defined as follows: _bstr_t bstrTableType("Table"); varCriteria[0].vt = VT_EMPTY; varCriteria[1].vt = VT_EMPTY; varCriteria[2].vt = VT_EMPTY; varCriteria[3] = bstrTableType; VARIANT varData; SAFEARRAY FAR* psa; SAFEARRAYBOUND rgsabound[1]; rgsabound[0].lLbound = 0; rgsabound[0].cElements = 4; psa = SafeArrayCreate(VT_VARIANT, 1, rgsabound); // Fill the safe array. for( lIndex = 0; lIndex < 4;lIndex++) { hr = SafeArrayPutElement(psa, &lIndex,&varCriteria[lIndex]); } // Initialize variant with safearray. varData.vt = VT_VARIANT | VT_ARRAY; V_ARRAY(&varData) = psa; Con.CreateInstance(__uuidof(ADODB::Connection)); Con->Open(L"DSN=pubs", L"", L"", -1L); Rs1 = Con->OpenSchema(ADODB::adSchemaTables,varData); does anyone know, how to build that specific variant, which is passed to the function OpenSchema(ADODB::adSchemaTables,varData) ? Furthermore this problem does not only concern this example, but there are other cases, where I'd like to pass a *variant structure* (??) to an ActiveX Invoke node, e.g. if you use the Internet Explorer Object and invoke the print method, you need to pass a *special* varaiant to the method, too, in order to remove the default print headers (wich look pretty uggly ...) Maybe such variants can be created by calling *other* ActiveX Invoke or Property nodes - but which class should I use ? Any help would be realy appreciated! Quote Link to comment
i2dx Posted February 15, 2007 Author Report Share Posted February 15, 2007 I just wanted to bring that thread up again ... the problem still exists ... Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.