Click here to Skip to main content
15,889,838 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: cannot convert void * to System::Data::DataColumn Pin
Jun Du13-Jul-06 2:09
Jun Du13-Jul-06 2:09 
GeneralRe: cannot convert void * to System::Data::DataColumn [modified] Pin
arvindbhateja13-Jul-06 2:29
arvindbhateja13-Jul-06 2:29 
GeneralRe: cannot convert void * to System::Data::DataColumn Pin
Jun Du13-Jul-06 3:52
Jun Du13-Jul-06 3:52 
GeneralRe: cannot convert void * to System::Data::DataColumn Pin
arvindbhateja13-Jul-06 4:00
arvindbhateja13-Jul-06 4:00 
GeneralRe: cannot convert void * to System::Data::DataColumn Pin
Jun Du13-Jul-06 4:55
Jun Du13-Jul-06 4:55 
GeneralRe: cannot convert void * to System::Data::DataColumn [modified] Pin
arvindbhateja13-Jul-06 5:00
arvindbhateja13-Jul-06 5:00 
GeneralRe: cannot convert void * to System::Data::DataColumn Pin
Jun Du13-Jul-06 6:02
Jun Du13-Jul-06 6:02 
GeneralRe: cannot convert void * to System::Data::DataColumn Pin
arvindbhateja13-Jul-06 23:45
arvindbhateja13-Jul-06 23:45 
Thanks for helping me so much.

Can u tell me just one more thing - What is the alternate to CMapStringToOb MFC class in C++/CLI. Plz can u suggest me what should I do to write the code in C++/CLI for the code shown below:

<br />
int nCount = clRecSet.GetFieldCount();<br />
	// Th efield count.<br />
    CDaoFieldInfo*  pclFieldInfo;  // Pointer for field info.<br />
    CMapStringToOb  clTables;      // For table.<br />
    CPtrList* pclFields = NULL;     // Pointer list.<br />
       <br />
	for (int ii = 0; ii < nCount; ii++)<br />
	{<br />
		pclFieldInfo = new CDaoFieldInfo;<br />
		clRecSet.GetFieldInfo(ii, *pclFieldInfo, AFX_DAO_SECONDARY_INFO);<br />
        if (clTables.Lookup (pclFieldInfo->m_strSourceTable, <br />
			                  (CObject*&) pclFields)  != TRUE )<br />
        {<br />
            pclFields = new CPtrList;<br />
            clTables.SetAt (pclFieldInfo->m_strSourceTable, pclFields);<br />
        }<br />
        pclFields->AddTail ((void *) pclFieldInfo);<br />
    }<br />
    // Now the fields are grouped together by table name<br />
...<br />
...<br />
<br />
    POSITION pos = clTables.GetStartPosition();<br />
	// Position index.<br />
    while (pos != NULL)<br />
    {<br />
	pclFields = NULL;<br />
        CPtrList*   pclFields;<br />
        CDaoFieldInfo* pFieldInfo;  // The field info.<br />
        <br />
        clTables.GetNextAssoc (pos, strCurrTbl, (CObject*&) pclFields);<br />
        POSITION posField = pclFields->GetHeadPosition();<br />
	int nIndex = 0; // Index for the loop.<br />
        while (posField != NULL)<br />
        {<br />
            pFieldInfo = (CDaoFieldInfo *) pclFields->GetNext (posField);<br />
<br />
.....<br />
            <br />


In the the above code I can replace :

CMapStringToOb -> ?
CPtrList -> ArrayList
CDaoFieldInfo -> DataColumn (Problem with fetching the database table name not the table name which comes from dataset object)

In DataColumn I can't get the name of the table, the column actually belongs to as we can do in CDaoFieldInfo::m_strSourceTable. Actually I've to map the name of the table with it's corresponding column and put that into a CMapStringToOb object.
GeneralRe: cannot convert void * to System::Data::DataColumn Pin
Jun Du14-Jul-06 8:38
Jun Du14-Jul-06 8:38 
QuestionMoving the DrawnRectangle with mouse on the Form [modified] Pin
Nagaraju_Focus12-Jul-06 19:36
Nagaraju_Focus12-Jul-06 19:36 
AnswerRe: Moving the DrawnRectangle with mouse on the Form Pin
Jun Du13-Jul-06 2:03
Jun Du13-Jul-06 2:03 
GeneralRe: Moving the DrawnRectangle with mouse on the Form Pin
Nagaraju_Focus13-Jul-06 23:02
Nagaraju_Focus13-Jul-06 23:02 
GeneralRe: Moving the DrawnRectangle with mouse on the Form Pin
Jun Du14-Jul-06 2:10
Jun Du14-Jul-06 2:10 
GeneralRe: Moving the DrawnRectangle with mouse on the Form Pin
Nagaraju_Focus14-Jul-06 20:16
Nagaraju_Focus14-Jul-06 20:16 
GeneralRe: Moving the DrawnRectangle with mouse on the Form [modified] Pin
mertadin21-Jul-06 3:00
mertadin21-Jul-06 3:00 
QuestionC++ .NET Exception Pin
Pavan Rao12-Jul-06 19:21
Pavan Rao12-Jul-06 19:21 
AnswerRe: C++ .NET Exception Pin
Jonathan [Darka]12-Jul-06 21:54
professionalJonathan [Darka]12-Jul-06 21:54 
GeneralRe: C++ .NET Exception Pin
Pavan Rao12-Jul-06 22:56
Pavan Rao12-Jul-06 22:56 
GeneralRe: C++ .NET Exception Pin
Jonathan [Darka]12-Jul-06 22:58
professionalJonathan [Darka]12-Jul-06 22:58 
QuestionReleasing Managed Direct3D Device Pin
kevinFields12-Jul-06 6:16
kevinFields12-Jul-06 6:16 
QuestionThe memory could not be "written". error Pin
Shamnar12-Jul-06 1:57
Shamnar12-Jul-06 1:57 
AnswerRe: The memory could not be "written". error Pin
Jonathan [Darka]12-Jul-06 3:41
professionalJonathan [Darka]12-Jul-06 3:41 
QuestionWindows Forms Pin
mehmetned11-Jul-06 21:58
mehmetned11-Jul-06 21:58 
AnswerRe: Windows Forms Pin
Jonathan [Darka]12-Jul-06 3:59
professionalJonathan [Darka]12-Jul-06 3:59 
GeneralRe: Windows Forms Pin
mehmetned12-Jul-06 4:46
mehmetned12-Jul-06 4:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.