### DB->get_type |

`

###

    #include <db.h>

    int
    DB->get_type(DB *db, DBTYPE *type);

### Description: DB->get_type

The DB->get_type method returns the type of the underlying access method (and file format). The type value is one of DB_BTREE, DB_HASH, DB_RECNO, or DB_QUEUE. This value may be used to determine the type of the database after a return from DB->open with the type parameter set to DB_UNKNOWN.

The DB->get_type method may not be called before the DB->open method has been called.

The DB->get_type method returns a non-zero error value on failure and 0 on success.

### Parameters

type
  The type parameter references memory into which the type of the underlying access method is copied.

### Errors

The DB->get_type method may fail and return one of the following non-zero errors:

EINVAL
  If the method was called before DB->open was called; or if an invalid flag value or parameter was specified.

### Class

DB

### See Also

Databases and Related Methods`

Copyright (c) 1996-2006 Oracle Corporation - All rights reserved.