answersLogoWhite

0

How do you Access MS Access from C?

Updated: 8/10/2023
User Avatar

Wiki User

13y ago

Best Answer

The following example creates an OracleConnection and sets some of its properties in the connection string. * ** Syntax based on .NET Framework version 1.1 ** #using #using #using using namespace System; using namespace System::Data; using namespace System::Data::OracleClient; __gc class COracleConnection

{ public:

void CreateOracleConnection( )

{ String* myConnString Oracle8i;Integrated Security new OracleConnection( myConnString ); myConnection->Open( ); MessageBox::Show( String::Format( S"ServerVersion: {0}\nDataSource:{1}", myConnection->ServerVersion, myConnection->DataSource ) ); myConnection->Close(); } }; // This is the entry point for this application #ifdef _UNICODE int wmain( void ) #else int main( void ) #endif { COracleConnection *pCOracleConnection = new COracleConnection(); pCOracleConnection->CreateOracleConnection( ); return 0; } You will use Oracle's API. Its called OCI for Oracle Call Interface -- use Google for details about its usage. You can also use OTL, which is the Oracle Template Library. Its much easier to use than OCI. Additionally, you can use embedded sql and precompile this code into pure C using the Oracle Pro*C/C++ precompiler. Sample code exists in ORACLE_HOME/precomp/demo/proc and ORACLE_HOME/rdbms/demo. As Oracle is the largest database company in the world with the largest market share of enterprise s/w, you can bet there is code all over the internet to do what you want to do. Check the forums at otn.oracle.com, google (or other search engine), or asktom.oracle.com. Answer You can also use library such as OCILIB (wraper for OCI) and Libsqlora. The other solution is use UnixODBC for unix programming environtment. Visit www.alldatabaseprogramming.blogspot.com or www.gtkinaction.blogspot.com for further information.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

8y ago

The C and C++ languages do not have standard libraries to manage databases, you need to use the libraries provided by the compiler, or database vendors or

any 3rd party libraries to connect and manage databases.

You can find libraries and examples of connecting to MySQL, Oracle and Sybase databases from here:

http://prokutfaq.byethost15.com/HowToConnectDatabase

This answer is:
User Avatar

User Avatar

Wiki User

15y ago

The easiest way to access an Access database from C++ is to use ODBC. An access database can easily be setup as an ODBC data source. The "Connection Strings" website provides you with many alternatives and 'connection string' syntax to complete this, too. Try; http://www.connectionstrings.com/

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

You do not access MS Access from C you do it from windows by using MS Access api calls.

MS Access does not run on a computer running Linux, QNX or DOS etc. but they can all be programmed in C

This answer is:
User Avatar

User Avatar

Wiki User

8y ago

U need to find the DRIVER for C language that will connect to Oracle or Access Database and then access that driver through C program.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you Access MS Access from C?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you access the hard drive in MS-DOS?

If MS-DOS is installed and booted from the drive, it can be accessed immediately at the command prompt. If you have booted from an MS-DOS floppy, you can access the hard drive by typing C:


What programming language was Ms Access written in?

Microsoft Access was developed on C#. Source: MSDN (Microsoft Developer Network)


What is the drawback of ms access?

The tables in MS Access have a size limitation. A better alternative to MS Access is SQL Server.


What can you do with the ms access?

with ms access we can create tables, queries, forms, reports, pages, macros and modules which are the objects of ms access.


Access 2003 compatible with Access 2000?

MS Access 2003 is able to produce MS Access 2000 compatible databases.


Does MS Access require MS Office to run?

No. MS Access is a component of MS Office, but you do not need the other applications (e.g. Word, Excel, PowerPoint, etc.) to run Access. However, there are many shared resources between MS Access and other MS Office applications. Obviously, if you remove (uninstall) MS Excel from your MS Office collection and delete all your spreadsheets, you will not be able to import Excel data to Access.


What are MS Power Point and MS Access used for?

MS PowerPoint is a presentation application for making presentations. MS Access is a database application for making databases.


What is fullform of sql of ms access?

access


Do i need a Microsoft Access license if i want to access a Access-DB through a own written C plus plus -Programm?

No. You need an ODBC, OLE, or DAO driver that understand MS Access. That should come with the C++ run-time, or with the most recent version of DAO for Windows.


What database functions does MS Access support?

MS Access supports most of the ANSI-92 SQL subset.


What is the default data type in MS Access?

Text is the default data type in MS Access.


Access screen layout of MS Access database?

FOTM