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!

Please Help! add new record

Status
Not open for further replies.

record

Programmer
Apr 2, 2002
2
US
Pls Help I want to add new record to table using VC++, i have tried following code but gettting DEBUG ERROR.

dataTableSet recset(pdb);
recset.Open();
recset.AddNew();

// i have not included m_Stock_ID, Stock_ID is Primary KEY
//in my access table.assuming that it will just add new
//number to the record upon pressing Add Record button
// and add the following two field


m_Stock_Name = m_StockName; //read from dialog box
m_Stock_Price = m_StockPrice;
Updatedata(FALSE);

Please tell me where i am going wrong, or direct me in the right direction.

thanks for any help.
 
Try using ADO.It's easier...a lot of documentation...and if
you will need help on this direction I'll help you
 
Is there no solution to my problem, do i really need to know ADO and start my application all over again. I am sure there someone out there who has the answer to my question, pls help.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top