1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
.\" msqlListDBs - Get a list of existing databases
.\" Copyright (c) 1996 Martin Schulze <joey@office.individual.net>
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc.,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
.\"
.\" This manual page is written especially for Debian GNU/Linux.
.\"
.TH msqlListDBs 3 "4 Aug 1996" "Mini SQL" "mSQL Programmer's Manual"
.SH NAME
msqlListDBs \- Get a list of existing databases
.SH SYNOPSYS
.nf
.B #include <msql.h>
.sp
.BI "m_result *msqlListDBs(int " sock );
.fi
.SH DESCRIPTION
A list of databases known to the mSQL database engine can be obtained
via the
.B msqlListDBs()
function. A result handle is returned to the calling program that can
be used to access the actual database names. The indivudual names are
accessed by calling
.BR msqlFetchRow (3)
passing it the result handle. The
.I m_row
data structure returned by each call will contain one field being the
name of the one of the available databases. As with all functions
that return a result handle, the data associated with the result must
be freed when it is no longer required using
.BR msqlFreeResult (3).
The
.I m_result
structure is defined in
.I <msql.h>
as follows:
.RS
.nf
.ta 8n 16n 32n
typedef struct result_s {
m_data *queryData,
*cursor;
m_fdata *fieldData,
*fieldCursor;
int numRows,
numFields;
} m_result;
.fi
.RE
.SH "RETURN VALUE"
A result handle is returned. If it is empty
.BR msqlNumRows (3)
will return 0.
.SH "SEE ALSO"
.BR msqlSelectDB (3),
.BR msqlStoreResult (3),
.BR msqlFreeResult (3),
.BR msqlFetchRow (3),
.BR msqlNumRows (3).
|