|
-
Dec 11th, 2001, 02:13 AM
#1
Urgent!!! Database Access in C++
Hi Everyone,
I am trying to write a service in an ATL object project where I need to access an access database via the code. I know that the normal method is to start with the DAO class CDaoDatabase.
I tried:
CDaoDatabase* MyDB;
But C++ always returns the error "Expected ';' after CDaoDatabase" when I try to build it, I have no idea of where to go next. Please Help!?!
Thanks a mil in anticipation.
Needaname16.
-
Dec 11th, 2001, 03:37 PM
#2
Monday Morning Lunatic
CDaoDatabase is an MFC class and can't intrinisically be used in ATL (which defies the principle of using ATL if you're just going to use MFC anyway ).
You can use #import to do this, but I don't have any more info other than the name (never used it, didn't need to since I don't use COM through C++).
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Dec 12th, 2001, 04:38 AM
#3
I'm Lost
I looked up the import in the help and I understand what parksie means, however like him I have never tried this before and I wouldn't have a clue as to what file I need to import to get access to Access Databases. PLEASE!!!!!!! has anyone got any advice as to how I could achieve this.
Or does anyone have any idea of how to convert a normal MFC app in C++ to a service for WinNT.
(Surely someone has done something similar in the past)
PLEASE!!!!
Thanks
Needaname16
-
Dec 12th, 2001, 12:42 PM
#4
There are also ADO, OLE and ODBC database access methods...
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Dec 12th, 2001, 07:25 PM
#5
Fanatic Member
How?
Could any of you please tell me how to use and initialize the MS Access Engine? I would like to use it to store a bit of information like:
My Name
My Age
My Gender
and available for many entries.
Thanks a lot

prog_tom
JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
http://physics.sviesoft.com/forum
-
Dec 12th, 2001, 07:45 PM
#6
Frenzied Member
-
Dec 12th, 2001, 07:48 PM
#7
Fanatic Member
YOu know
You know just how to use MS Access to input info and then output it.

prog_tom
JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
http://physics.sviesoft.com/forum
-
Dec 12th, 2001, 07:56 PM
#8
Frenzied Member
I only dabbled in databases with vb but you have to create one first with all the places for data....I don't think you create the actual file in code though....
-
Dec 12th, 2001, 08:54 PM
#9
Fanatic Member
HOW?
Can you tell me how do you input and output in ASP Code?(MS Access)

prog_tom
JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
http://physics.sviesoft.com/forum
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|