Link to home
Avatar of jhapak
jhapak

asked on

Adding Database Functionality

Hello,
I am trying to add database functionality using ODBC in an existing project. I am using class wizard to create classes and to connect to database using ODBC. The problem is whenever I try to perform any action on the database it gives me runtime errors and application just closes.

Method I followed is:
1. New Class
2. Give Class Name: dbCn
3. Base Class Name: CRecordset
4. Select ODBC Connection
5. Select Table

inlude file has already been placed in stdafx.h

Now I am trying:
dbCn *db1 = new dbCn;
db1.AddNew();  /////  <---- the problem is here, the problem is on every database operation

Can anybody tell me what do I have to include or do or any link

Thanks
ASKER CERTIFIED SOLUTION
Avatar of nabehs
nabehs

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial