serramanna
Programmer
Hello:
Can you help me?, i try to pass the values of the colummns of a resultset in a remote data control into another.
This is an example of the code that i use for, it is wrong, why?
if(m_rdatactrl2.GetResultset().GetUpdatable())
{
m_rdatactrl2.GetResultset().AddNew();
m_rdatactrl2.GetResultset().Edit();
VARIANT index;
index.vt = VT_I2;
index.iVal = (short)0;
VARIANT value;
value.vt = VT_EMPTY;
for(index.iVal;index.iVal<(short)m_rdatactrl1.GetResultset().GetRdoColumns().GetCount();index.iVal++)
{
value=m_rdatactrl1.GetResultset().GetRdoColumns().GetItem(index).GetValue();
m_rdatactrl2.GetResultset().GetRdoColumns().GetItem(index).SetValue(value);//this line fails
value.vt=VT_EMPTY;
}
m_rdatactrl2.GetResultset().Update();
I hope you can help me, thanks.
(sorry my english is very bad)
Can you help me?, i try to pass the values of the colummns of a resultset in a remote data control into another.
This is an example of the code that i use for, it is wrong, why?
if(m_rdatactrl2.GetResultset().GetUpdatable())
{
m_rdatactrl2.GetResultset().AddNew();
m_rdatactrl2.GetResultset().Edit();
VARIANT index;
index.vt = VT_I2;
index.iVal = (short)0;
VARIANT value;
value.vt = VT_EMPTY;
for(index.iVal;index.iVal<(short)m_rdatactrl1.GetResultset().GetRdoColumns().GetCount();index.iVal++)
{
value=m_rdatactrl1.GetResultset().GetRdoColumns().GetItem(index).GetValue();
m_rdatactrl2.GetResultset().GetRdoColumns().GetItem(index).SetValue(value);//this line fails
value.vt=VT_EMPTY;
}
m_rdatactrl2.GetResultset().Update();
I hope you can help me, thanks.
(sorry my english is very bad)