/* Call Level Interface -SQL */
#include "sql.h"
HENV henv; HDBC hdbc; HSTMT hstmt;
void main() {
SQLAllocEnv(&henv);
SQLAllocConnect(henv, &hdbc);
SQLConnect(hdbc,"t:serveur:base",SQL_NTS,"user",SQL_NTS,"passwd",SQL_NTS );
SQLAllocStmt(hdbc,&hstmt);
SQLExecDirect(hstmt,"insert into messages value ('Hello world')",SQL_NTS);
SQLFreeStmt(hstmt,SQL_DROP);
SQLDisconnect(hdbc);
SQLFreeConnect(hdbc);
SQLFreeEnv(henv);
}
Diapositive précédente | Diapositive suivante | Revenir à la première diapositive | Afficher la version graphique |