Hello Manjree,
Thanks for your reply.
I have gotten the email and replied you. If you face any further issue,
please don't hesitate to reply me. I will follow up.
For the second issue:
Just as you have seen, the datatype of row->default["strgTemp"] is
System:
ouble and row->default["dateExpiry"] is System:
ateTime.
Now, the issue has been changed to how to convert System:
ouble and
System:
ateTime to CDialog(dlg) float and date types. This is an issue
about .Net managed datatype and CDialog(dlg) unmanaged data types.
I have consulted my colleague (Jeffrey Tan) who is an expert in C++ field.
To convert System:
ouble to CDialog(dlg)float, would you please try the
following method?
dlg.m_sampStrgTemp = static_cast<double>(row->default[L"strgTemp"]);
We have done a test on our side and it works fine.
System
uble db=3.15;
Test(static_cast<double>(db));
#pragma unmanaged
void Test(double db)
{
double test= db;
}
#pragma managed
To convert System:
ateTime to ColeDateTime, it seems we cannot cast it
directly.
We have to pass year,month,day and time to create a new COleDateTime
object. As below.
DateTime^ dt=row->default[L"dateExpiry"];
dlg.m_sampDtExp= COleDateTime obj(dt->Year, dt->Month, dt->Day, dt->Hour,
dt->Minute,dt->Second);
Please try the above method. If the issue still persists, would you please
create a simple project which could reproduce the issue? This will help on
the research very much. I think we have to perform further analyze on it.
Have a great day. Please let me know if you have any more concern. I'm glad
to assist you.
Have a great day,
Best regards,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.