| |

VerySource

 Forgot password?
 Register
Search
View: 824|Reply: 3

MFC connection to the database

[Copy link]

2

Threads

4

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-4 10:00:01
| Show all posts |Read mode
I used MFC to create a single document-based application framework (the data source was not bound during the creation process). I wanted to connect to the data source when the user entered the corresponding password in the program, so I derived my own from the RECORDSET Class, but it prompts 'CRecordset': base class undefined at compile time. What is the problem? How can I solve it?
Reply

Use magic Report

2

Threads

4

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-1-4 11:45:01
| Show all posts
Oh, I solved it myself, as long as I added #include "afxdb.h" to stdafx.h
Reply

Use magic Report

0

Threads

13

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-7-7 20:45:01
| Show all posts
Use ado
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-3 16:30:01
| Show all posts
The original poster uses DAO, database programming or ADO
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list