Exemple #1
0
EXPORT RM_ENTRY(rmc_drop_database)
{
	ClearParamPool();
	ISC_STATUS *stat = AllocStatusPool();
	isc_drop_database(stat, (isc_db_handle *)arg_vector[1].a_address);
	StatusToCobol(&arg_vector[0], stat);

	return (0);
}
Exemple #2
0
/**
 * This function attempts to attach to and drop a specified database. This
 * function provides the drop method for the Database class.
 *
 * @param  self      A reference to the Database object representing the
 *                   database to be dropped.
 * @param  user      A reference to the database user name that will be used
 *                   in dropping the database
 * @param  password  A reference to the user password that will be used in
 *                   dropping the database.
 *
 * @return  Always returns nil.
 *
 */
static VALUE dropDatabase(VALUE self, VALUE user, VALUE password) {
  VALUE connection = rb_connection_new(self, user, password, Qnil);
  ConnectionHandle *cHandle   = NULL;
  ISC_STATUS status[ISC_STATUS_LENGTH];

  Data_Get_Struct(connection, ConnectionHandle, cHandle);
  if(isc_drop_database(status, &cHandle->handle) != 0) {
    rb_fireruby_raise(status, "Error dropping database.");
  }

  return(Qnil);
}