C++... database connectivity
Results 1 to 7 of 7

Thread: C++... database connectivity

  1. #1
    Senior Member
    Join Date
    Jun 2003
    Posts
    220

    Question C++... database connectivity

    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.

  2. #2
    Senior Member
    Join Date
    Jun 2003
    Posts
    188
    You forgot to mention your working environment. I guess its Turbo C++ 3.0 . If it is then it dows not provide any database connectivity. If your are using VC++ consult MSDN.

  3. #3
    Senior Member
    Join Date
    May 2003
    Posts
    472
    Use VC++ and consult MSDN
    guru@linux:~> who I grep -i blonde I talk; cd ~; wine; talk; touch; unzip; touch; strip; gasp; finger; mount; fsck; more; yes; gasp; umount; make clean; sleep;

  4. #4
    Senior Member
    Join Date
    Jan 2002
    Posts
    1,207
    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

  5. #5
    Senior Member Maestr0's Avatar
    Join Date
    May 2003
    Posts
    604
    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:

    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.
    source:http://info.borland.com/techpubs/bcp...s/program.html

    -Maestr0
    \"If computers are to become smart enough to design their own successors, initiating a process that will lead to God-like omniscience after a number of ever swifter passages from one generation of computers to the next, someone is going to have to write the software that gets the process going, and humans have given absolutely no evidence of being able to write such software.\" -Jaron Lanier

  6. #6
    Senior Member
    Join Date
    Jun 2003
    Posts
    236
    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.
    That which does not kill me makes me stronger -- Friedrich Nietzche

  7. #7
    Senior Member
    Join Date
    Jun 2003
    Posts
    220
    thanks a lot to you all...
    yes i was using turbo c++...
    ok i will try VC++ for the same purpose...
    Riya
    Now is the moment, or NEVER!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •