I've created an ODBC database with a single table named "Housings". This table has 8 different fields that I would like to add data from a VC++ application. I've completed everything up to the point of interfacing with the database. I connect as follows:
I've already calculated values and entered them into 8 different CString objects. I now need to insert the values into the database. Is there a relatively simple way to accomplish this?
PLEASE HELP!!
Code:
if(!database.Open(NULL, FALSE, TRUE, "ODBC;DSN=On-X Component Data"))
{
AfxMessageBox("Failed to open the database connection.");
}
CWallAngle_Set wallangle_set(&database);
wallangle_set.m_strFilter = "";
if(!wallangle_set.Open())
{
AfxMessageBox("Cannot find records.");
}
*** I assume this is where I need to add the INSERT code. ***
wallangle_set.Close();
database.Close();
I've already calculated values and entered them into 8 different CString objects. I now need to insert the values into the database. Is there a relatively simple way to accomplish this?
PLEASE HELP!!