HowTo: SQLDBC


Prerequisites


All the files required to run the examples are contained in the directory $DEP/doc/FirstSteps/SQLDBC.


Accessing SQL using SQLDBC

Hello, MaxDB
HelloMaxDB.cpp shows
  • how to connect to the database
  • how to execute SQL
  • how to fetch results
  • make it with
    nmake
    make
  • and execute the program with
    HelloMaxDB <username> <password> <database> <hostname>
    The command line arguments are optional, the defaults will access the installed example database MAXDB1 with user MONA and password RED.