Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Designing Access DB for C++ program

Status
Not open for further replies.

pghTech

Technical User
Jul 19, 2006
37
US
I am writing a program, where I would like the user to be able to use any of the fields I provide to search for records that correspond, either using only one field, or a any combination of the fields available. I am struggling to figure out how to setup the Access DB for my program to use.

Do I need to set each field to a Primary Key? or can I still do Select * searches on any of the fields whether or not it uses the primary key field or not?

To be more specific, I am new to the whole C++ language and attempting to write a program I am excited about that will help me solidify some of the things I have been learning about C++. However, I am not trying to learn every knuck and cranny of Microsoft Access. I have used it in the past to make very simple DB's, but thought I would turn to the community about how i should approach my above situation.

The fields I have available on the GUI that I would like the user to be able to use either individually or together are:

Title
Description
Language
Type of Code
Application Name

Any help is greatly appreciated.
 
You probably need to read Fundamentals of Relational Database Design on Rudy Limeback's site.

It's not so much Access that you need to know ... it is RDBMS design concepts (the above paper) and database interface methods such as ADO. The language that you use (C++, C#, VB, etc.) will have somewhat different syntax requirements but generally the API that you use to talk to the DBMS will have much the same capabilities in all languages.

Of course, if you are using .Net, then there is a range of builtin class interfaces available to talk to databases that were not available in earlier C++ implementations.
 
Thanks Golom for that information - I'll get on reading that.

Since I am trying to do this with C++, and I am not familar with these .NET interfaces your referring to, would it be adventagous to write the interface in .NET and the back end in C++? and is that even possible without having to be a master in either language?
 
.NET isn't a language ... it is an environment that supports several languages (e.g. C++.NET, C.Net, VB.Net, C#.Net) through a framework called the Common Language Runtime (CLR).

You may have Visual Studio 6 (for example) and the C++ compiler in that environment OR you may have Visual Studio .NET which also has a C++ implementation. There are some language differences between the two versions of C++ but they are generally pretty similar as far as the coding rules are concerned. What is vastly different between them is that C++.NET (and other .NET languages) have access to very different libraries and objects than are found in the VS6 environment.

Regardless of how you go about it, you will have to come up to speed on both the language that you want to use and the database interfaces available in the version of the environment in which you are working. Routine database work doesn't require "master" status but, like anything else, the more you know about the language and the environment the better able you will you be to take advantage it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top