Skip to Content
avatar image
Former Member

Need one or two example programs using SQLDBC

We have an application which we are porting to support MaxDB as back end. Currently the application supports MySQL,Sybase,Oracle and DB2.

The application is using only external libraries of C format for all other databases and there is established framework for using this. So, for MaxDB also we are planning to use the and it's C format functions.

However one problem i am facing as a developer is, there are hardly any examples available on the web using SQLDBC and C/C++. The only one i could get my hands on is the one shipped with the product: HelloMaxDB.cpp.

Can someone help me with few example programs.



Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Sep 05, 2008 at 08:32 AM

    Hello Raj

    Did you consider to use ODBC? If you intend to have some generic code, which can be shared between different implementations for different databases, surely ODBC is the better choice. Actually ODBC applications can be very generic.

    For SQLDBC some example code snippets are in the documentation for Statement, PreparedStatement and ResultSet.

    The HelloWorld example demonstrates how to connect, sending an SQL-query and reading data from the result set. Of course, the example is very simple (e.g. releasing resources is not included).

    HTH & regards Thomas

    Add comment
    10|10000 characters needed characters exceeded