7 Replies - 4473 Views - Last Post: 20 January 2011 - 08:44 AM

#1 ramo1995  Icon User is offline

  • New D.I.C Head

Reputation: 8
  • View blog
  • Posts: 38
  • Joined: 24-July 10

Connecting a C++ Program to an Access Databse

Posted 14 January 2011 - 05:56 AM

Hello!

I am quite new to C++. I have a project to make in which I have to connect a C++ Program to a Microsoft Access Database. So this is what I have to do:

1. Make the Access Database ( I can do this.)

2. Connect the Database with C++ Forms Program ( This is what I need help in.)

So I just want to know three things.

1. What should I use in the program itself to show the records, data, etc. ( What control?)

2. How to link the database to the program.

3. What methods can I use? ( get record, delete record, query, etc)


Thanks very much !

Is This A Good Question/Topic? 0
  • +

Replies To: Connecting a C++ Program to an Access Databse

#2 janotte  Icon User is offline

  • code > sword
  • member icon

Reputation: 990
  • View blog
  • Posts: 5,141
  • Joined: 28-September 06

Re: Connecting a C++ Program to an Access Databse

Posted 14 January 2011 - 06:03 AM

Here is a good place to start your reading
http://msdn.microsof...3(v=vs.80).aspx
Was This Post Helpful? 3
  • +
  • -

#3 Aphex19  Icon User is offline

  • Born again Pastafarian.
  • member icon

Reputation: 615
  • View blog
  • Posts: 1,873
  • Joined: 02-August 09

Re: Connecting a C++ Program to an Access Databse

Posted 14 January 2011 - 06:09 AM

edit: janotte's advice is much better

Quote

1. What should I use in the program itself to show the records, data, etc. ( What control?)


Personally, I'd use the Windows API, but that's because i'm familier with it. As for which control you should use, i'm not sure, how do you want to display the records? if you want to display the records in a table, it will be tricky, but for simplicity's sake you could just use the TextOut function to display the data to the form.

Quote

2. How to link the database to the program.


mysql++?

Quote

3. What methods can I use? ( get record, delete record, query, etc)


See mysql++ docs

This post has been edited by Aphex19: 14 January 2011 - 06:11 AM

Was This Post Helpful? 1
  • +
  • -

#4 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6091
  • View blog
  • Posts: 23,605
  • Joined: 23-August 08

Re: Connecting a C++ Program to an Access Databse

Posted 14 January 2011 - 06:28 AM

Is this C++ with .NET? I noticed you mentioned Forms.
Was This Post Helpful? 0
  • +
  • -

#5 ramo1995  Icon User is offline

  • New D.I.C Head

Reputation: 8
  • View blog
  • Posts: 38
  • Joined: 24-July 10

Re: Connecting a C++ Program to an Access Databse

Posted 14 January 2011 - 10:54 AM

View PostJackOfAllTrades, on 14 January 2011 - 05:28 AM, said:

Is this C++ with .NET? I noticed you mentioned Forms.

Yes. I am using Microsoft Visual C++ 2008 Express Edition. The program I'm going to make is going to need forms.
Was This Post Helpful? 0
  • +
  • -

#6 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6091
  • View blog
  • Posts: 23,605
  • Joined: 23-August 08

Re: Connecting a C++ Program to an Access Databse

Posted 14 January 2011 - 01:03 PM

OK, moved to CLI C++.

And the link janotte provided should be everything you need to get started.

This post has been edited by JackOfAllTrades: 14 January 2011 - 01:05 PM

Was This Post Helpful? 1
  • +
  • -

#7 ramo1995  Icon User is offline

  • New D.I.C Head

Reputation: 8
  • View blog
  • Posts: 38
  • Joined: 24-July 10

Re: Connecting a C++ Program to an Access Databse

Posted 20 January 2011 - 06:38 AM

Thanks everybody!

Just one quick qustion. Do I need to know SQL in order to do this? ( as Aphex19 said )
Was This Post Helpful? 0
  • +
  • -

#8 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6091
  • View blog
  • Posts: 23,605
  • Joined: 23-August 08

Re: Connecting a C++ Program to an Access Databse

Posted 20 January 2011 - 08:44 AM

If you're going to interact with a database, well yeah...you're going to need to use SQL.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1