Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy remotedata control resultset into another remotedata control

Status
Not open for further replies.

serramanna

Programmer
Jul 2, 2001
1
ES
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)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top