|
-
Oct 26th, 2001, 06:23 AM
#1
Thread Starter
Frenzied Member
access in C++
access in C++
first of all im new to C++
i have a program in VB which does what i want but isnt compatible with all the OS
anyway what i trying to do is display an access database via C++
can any one give me some code how this can be done??
P.S the database has two tables
thanks in advance
-----------------------------------------------
"The hall is rented,"
"the orchestra is engaged,"
"its now time to see if you can dance!"
Q, Q-Who, Star Trek The Next Generation
-----------------------------------------------
General Work day

-----------------------------------------------
DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle
-
Oct 26th, 2001, 08:16 AM
#2
It will be hard to write C++ code that will allow you to interact with an Access database across different platforms.
Because Access is a Microsoft thing... I would suggest looking into the ODBC API for Windows... but also look into the ODBC API for Linux... Both will allow you to interact with an Access DB. That will give you atleast one more platform.
I dont know much about the ODBC on Linux, but I was told the other day by a Linux "guru" that it works quite well. He said he hasn't had any problems connecting to an Access DB.
-
Oct 26th, 2001, 08:23 AM
#3
Thread Starter
Frenzied Member
probably on win 95 but have you any code to get me started
-----------------------------------------------
"The hall is rented,"
"the orchestra is engaged,"
"its now time to see if you can dance!"
Q, Q-Who, Star Trek The Next Generation
-----------------------------------------------
General Work day

-----------------------------------------------
DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle
-
Oct 27th, 2001, 10:44 AM
#4
well it depends on how you want to do it... MFC or API?
MFC -> take a look at CRecordset and CDatabase....
there are also classes derived from CRecordset like CDaoRecordset
API
Here is a link:
ODBC API
-
Oct 29th, 2001, 04:02 AM
#5
Thread Starter
Frenzied Member
any help would be fine
the easyest way will be best at first
-----------------------------------------------
"The hall is rented,"
"the orchestra is engaged,"
"its now time to see if you can dance!"
Q, Q-Who, Star Trek The Next Generation
-----------------------------------------------
General Work day

-----------------------------------------------
DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle
-
Oct 29th, 2001, 06:01 AM
#6
Monday Morning Lunatic
Would it be out of line for me to recommend learning the language first before trying to do anything complicated?
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
-
Oct 29th, 2001, 06:09 AM
#7
Thread Starter
Frenzied Member
maybe when ive got more time on my hands i will do a few tutorials and learn the basics for now i could do with a working program to work on and go from there, im sure the people of this domain will help me if i have any questions and help me
any real help on the subject
-----------------------------------------------
"The hall is rented,"
"the orchestra is engaged,"
"its now time to see if you can dance!"
Q, Q-Who, Star Trek The Next Generation
-----------------------------------------------
General Work day

-----------------------------------------------
DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle
-
Oct 29th, 2001, 06:15 AM
#8
Monday Morning Lunatic
But that's my point - you won't understand a working application if you don't know the language.
I'd suggest getting the basics together (structure, data types / sizes, pointers, arrays) and then you'll find it a lot easier rather than spinning your wheels on pointers (which I can guarantee will happen if you don't learn them first).
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
-
Oct 29th, 2001, 06:25 AM
#9
Thread Starter
Frenzied Member
well at present i can create a window but need to know how i can open a ms access database and display on the form/window any ideas how to do that
-----------------------------------------------
"The hall is rented,"
"the orchestra is engaged,"
"its now time to see if you can dance!"
Q, Q-Who, Star Trek The Next Generation
-----------------------------------------------
General Work day

-----------------------------------------------
DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle
-
Oct 29th, 2001, 11:20 AM
#10
just as you do in VB I thinl - the COM interface of access databases (DAO) exists in C++ too.
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.
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
|