2009/12/01

Firebird C API를 이용하여 데이터베이스 생성하기


isc_db_handle db = NULL; /* database handle */
isc_tr_handle trans = NULL; /* transaction handle */
ISC_STATUS_ARRAY status; /* status vector */
long sqlcode; /* SQLCODE */

char *szSQL = "CREATE DATABASE 'e:\\ew.fdb' USER 'sysdba' PASSWORD 'masterkey';";

if ( isc_dsql_execute_immediate(status, &db, &trans, 0, szSQL, 1, NULL) )
{
sqlcode = isc_sqlcode(status);

TRACE( "Fail to create database : %d\n", sqlcode );
}
else
{
TRACE( "Database created!!!\n" );
}

Original Post : http://neodreamer-dev.tistory.com/341

No comments :

Post a Comment