Allgemein Frage zu Datenbanken
-
Einen wunderschönen guten Morgen,
ich möchte meinem MFC-Projekt nun noch die Möglichkeit bieten auf eine Access Datenbank zuzugreifen.
Ich hab hier im Forum schon viel gestöbert und einige Möglichkeiten gelesen
z.B. ODBC, DAO, ADO.
Aber welche Möglichkeit ist die beste, einfachste und welche funktioniert mit Win98, 2000, XP, NT, und zukünftige Windows-Versionen?
Oder um es kurz zu machen welche Möglichkeit verwendet ein C++ Profi?Für einige Ratschläge wäre ich sehr dankbar.
Gruß
Dscho
-
OLEDB

-
ODBC
-
If the user wants to access data independently of the SQL language, he or she should migrate to OLE DB.
As we have pointed out, ODBC is bound to the SQL language. If the user’s problem can best be solved with direct table manipulation, OLE DB is a better solution.
· If the user wants parallel interfaces for rectangular and multi-dimensional data, he or she should migrate to OLE DB.
At present the only open industry standard for multi-dimensional data is based on OLE DB. If the user has a problem that involves the integration of these two forms of data, OLE DB is a better solution. It will reduce the amount of code needed.
· If the user wants to access data in an object server, he or she must migrate to OLE DB; there is no ODBC outlet.
There is no ODBC access to an IOM object server. The OLE DB provider that ships with this product is the only way a user has to get to SAS data sets in such a server.
· If the user wants to access different data stores (local, SHARE, IOM, etc) from a single application, he or she should migrate to OLE DB.
If the user plans to access data in an object server and any other data store, he should consider migrating the entire application to OLE DB. Otherwise he will be maintaining separate code paths for each access method. This argument is further supported by the theoretical idea that OLE DB reduces the likelihood of differences between drivers, SQL dialects and DBMSs that has been problematic among ODBC configurations.
· If the user wants to exploit as much of the SAS data model as possible from a thin-client application, he or she should migrate to OLE DB.
While ODBC is constrained by SQL, OLE DB is not. The OLE DB specification is much richer and more extensible than ODBC. We intend to develop our providers in future releases to encapsulate as much of the SAS data model as possible. To fully exploit this data model in a thin-client environment the user should
migrate to OLE DB.
· If the user needs the ability perform concurrent updates, he or she should migrate to OLE DB.
To update records using the ODBC driver the user must issue SQL UPDATE statements which are basically batch oriented updates. There is no concept of record locking in the ODBC model. OLE DB accomodates several locking models that allow multiple concurrent updates. This feature of OLE DB enables the development of much more data management applications than with ODBC.
-
Vielen Dank für Eure Antworten.
Ich hab im Internet nach OLEDB geschaut und einiges gefunden. Es scheint tatsächlich eine gute und einfache Lösung zu sein. Auch in der Hilfe von meinem Compiler hab ich ein bischen was gefunden.Dennoch hab ich es nicht geschaft einen Datensatz aus einer Access Tabelle in meinem Projekt einfach mal anzuzeigen.
Daher würde ich mich sehr freuen, wenn ihr mir ein Codebeispiel oder einen Link zu einem Beispiel hättet, in dem die grundsätzliche Vorgehensweise erklärt ist.
Gruß Dscho