hello everyone,
i want to do some project work in turbo C++.... n just want to know how to connect to the backend database? like SQL Server or Ms Access...
is there any way, i can do the same?
thanks in advance.
Printable View
hello everyone,
i want to do some project work in turbo C++.... n just want to know how to connect to the backend database? like SQL Server or Ms Access...
is there any way, i can do the same?
thanks in advance.
You forgot to mention your working environment. I guess its Turbo C++ 3.0 :D . If it is then it dows not provide any database connectivity. If your are using VC++ consult MSDN.
Use VC++ and consult MSDN
You should be able to use ODBC. This is not dependent on what compiler you are using.
ADO may also be usable. You will of course need to be competent in COM programming and know how to use the COM library provided by your compiler (or generate stubs or something depending on the environment, I'm not really sure)
You can also use an API for a specific database. SQL server and access both provide these AFAIK, however that would not be useful if you ever wanted to change DB.
Personally, I would think ODBC to be a good approach.
IT IS NOT NECESSARY to use MSVC for any C++ database API
Slarty
I agree with Slarty, ODBC is the way to go. Almost every modern language I know of has support for ODBC connectivity and Borland is no exception, here is a snippet from Borland's site:
source:http://info.borland.com/techpubs/bcp...s/program.htmlQuote:
Database connectivity and utilities
C++Builder and the VCL offer a variety of connectivity tools to simplify the development of database applications. The Borland Database Engine (BDE) is a collection of drivers that support many popular database formats, including dBASE, Paradox, FoxPro, Access, and any ODBC data source. SQL Links drivers, available with some versions of C++Builder, support servers such as Oracle, Sybase, Informix, DB2, SQL Server, and InterBase.
C++Builder includes components that you can use to access data through InterBase Express (IBX). IBX applications provide access to advanced InterBase features and offer the highest performance component interface for InterBase 5.5 and later.
IBX is based on the custom data access C++Builder component architecture, and is integrated with the Data Module Designer. IBX is compatible with C++Builder's library of data-aware components, and does not require the BDE.
You can create database tables at design time in the Form Designer. First, create field definitions using the Object Inspector, then right-click on the table component and choose Create Table.
Some versions of C++Builder include components to connect to databases using ActiveX Data Objects (ADO). ADO is Microsoft's high-level interface to any data source, including relational and non-relational databases, email and file systems, text and graphics, and custom business objects.
For more information...
See "Developing Database Applications" in the Developer's Guide or online Help.
-Maestr0
I would consider using MySQL.
There is a very nice api and documentation at mysql.com.
I used it with VC++ and it worked seemleasly.
thanks a lot to you all... :)
yes i was using turbo c++...
ok i will try VC++ for the same purpose...
Riya