Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
R

ramjan

@ramjan
About
Posts
4
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • OLEDB (CCommand) Problem
    R ramjan

    Hello, I’m facing some problem when I want to send the ICommand interface to the Client to work around the data fetched from the Database by OLEDB provider. I can successfully query the database and traverse through the Rowset at the Server end. When I’m packing the ICommand interface in a variant (as dispatch), at the Client End it throws the Error “No such interface supported”). Here is the excerpt from my code HRESULT CDAC::GetCommand (BSTR bstrQuery, VARIANT *pvarColumnInfo, VARIANT *pvarCmd) { HRESULT hr; CSession session; CCommand objCmd; LONG lRetVal; try { USES_CONVERSION; // Getting the Database connection by using the connection string lRetVal = GetDBConnection(); // Creating the session for the transaction hr = session.Open(m_objDBSrc); CHECK_HR(hr); // Create the Command by using the session for the query hr = objCmd.Create(objSession, bstrQuery); CHECK_HR(hr); // Command Optimization hr = objCmd.Prepare(); CHECK_HR(hr); // Execute the Command hr = objCmd.Open(); CHECK_HR(hr); // Place the column Information in the OUT VARIANT pvarColumnInfo->vt = VT_BYREF; pvarColumnInfo ->byref = (PVOID)cmdObj.m_pColumnInfo; // Place the command object in the OUT VARIANT pvarCmd->vt = VT_DISPATCH; pvarCmd->pdispVal = (IDispatch*)cmdObj.m_spCommand.Detach(); // Unable to get the ICommand, return the error if(pvarCmd ->pdispVal == NULL) { hr = E_FAIL; goto CLEANUP; } } catch(_com_error &ce) { ERRBOX(ce.ErrorMessage(), "Error"); hr = ce.Error(); goto CLEANUP; } catch(...) { ERRBOX("Unknown Error", "Error"); hr = E_UNEXPECTED; goto CLEANUP; } // Successfully Completed. Return Success code. hr = S_OK; CLEANUP: return hr; } Can anyone suggest that where I’m failing or how to pass the Command information from the Server to Client? Advance thanks, Regards, Ramesh M.

    ATL / WTL / STL database help sysadmin algorithms performance

  • WTL ScrollView scrolling problem!
    R ramjan

    Hi, I'm getting scrolling problem in WTL Scrollview window. I've derived a class from CScrollWindowImpl class and did some drawing. If I want to scroll the window, here the problem comes. In MFC OnInitialUpdate function there, is it any equivalent function available in WTL. Please can any one help me out? If I want to scroll dynamically by calculating the view size and set the scroll ranges, what are all the steps I've to follow? Advance thanx Regards, Ramesh.

    COM c++ help graphics question

  • registering/unregister components in MTS/COM+ Programmatically
    R ramjan

    Hello All, I want to register and unregister the components in MTS/COM+ environment programmatically. I know that the components registered with regsvr32 will be residing at HKEY_CLASSES_ROOT. But I don't know how MTS/COM+ keeps hold of the components reference. I can go with COM+ export feature so that it'll give me one msi file. But I want some alternatives. Can anyone help me? Timely help appreciated! with Advance Thanks, Ramesh.

    COM com help question workspace

  • Problem in passing recordset from server to client
    R ramjan

    Hello, I have some sort of problem in COM while passing the ADO recordset object through variant to the client. In the server I can able to traverse through the recordset:-O . Once I got the variant at the client end, the variant contains the NULL (VT_EMPTY):confused: . What is the problem? For your clarity I'm putting some excerption from my coding. At Server_End HRESULT CServer::Function1(VARIANT *pvarRSObj, VARIANT *pvarRetVal) { _RecordsetPtr pRSObj = NULL; try { pRSObj->CreateInstance(__uuidof(Recordset)); pRSObj->Open(varQueryString, (IDispatch*)m_conObj, adOpenKeyset, adLockBatchOptimistic, adCmdText); pvarRSObj->vt = VT_DISPATCH; pvarRSObj->pdispVal = (IDispatch*)pRSObj; } catch(_com_error &e) { ERRBOX(e.ErrorMessage()); return e.Error(); } catch(...) { ERRBOX("Unknown Exception"); return E_FAIL; } return S_OK; } At Client_End InvokeServer() { IServer *pServer; //instantiation of server pServer->Function1(&varRSObj, &varResponse); CHECKVARIANTTYPE(&varRSObj); //It'll check the variant type // this is showing me that variant contains VT_EMPTY. if(varRSObj.vt == VT_DISPATCH) { //necessary action } } Timely reply appreciated. Regards, Ramesh

    COM help question com sysadmin
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups