Just Logic/SQL Relational Database Management System

Web Server interface - Sample C++ code

Home | Product Description | Technical Features | Web-enabling option| Client-Server option | How to Order


#include <sqlcpp.h>
extern "C" DBMS_passwd(char*, char*);

int main()
{
SQL sql

   /* set up environment */
   setenv ("JLT_DBMS_SERVER", "localhost", 1);
   setenv ("JLT_DBMS_SERVER_CONFIG", "sqlsrv", 1);
   DBMS_passwd ("your username", "your password");

   /* write beginning of document */
   printf ("Content-type: text/html\n");
   printf ("\n");
   printf ("<HTML>\n");
   printf ("<HEAD>\n");
   printf ("<TITLE>Your Title</TITLE>\n");
   printf ("</HEAD>\n");
   printf ("<BODY>\n");
   printf ("<H1>Your Headline</H1>\n");

   /* connect to database */
   sql="connect database abc;";
   sql.execute();

   //PUT YOUR SQL COMMANDS HERE.
   //PRINTF THE RESULT TO STANDARD OUTPUT.

   printf("</BODY>\n");
   printf("</HTML>\n");
}


HomeHome

Just Logic Technologies Inc.
P.O. Box 63050
40 Commerce St.,
Nun's Island, Qc, H3E 1V6
Canada

email: sales@justlogic.com

Last modification: 7/96