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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help on adding records

Status
Not open for further replies.

trose178

Programmer
Nov 26, 2002
26
US
Hi, I have an MFC program using ODBC and that has four classes. DB1Set, DB1View, DB2Set, and DB2View respectively.

What I am trying to do is figure out how to add records to the the project. What I would like to do is try to use the same dialogs that I have now where I can edit them. But I'm not sure how to go about it. I know there is a function called SetFieldNull but when I look through the list of functions for my m_editboxctrl I don't find it in there.

If anyone can direct me the correct way to figuring out how to do this it would be greatly appreciated. Thanks.

Tim,
Currently Studying in High School
 
SetFieldNull is a member of CRecordset
I'm guessing that m_editboxctrl is of type CEdit

They are not the same. If you are going to set a value to Null, you must interact with the recordset directly, not the edit control that the user changes the value with.

Though calling m_editboxctrl.Clear() might improve the user interface if you set a field to null.

[sub]I REALLY hope that helps.[/sub]
Will
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top