.TH GDI_OPEN 3f "8/19/93 (v16.3)"
.ig
% ptroff -man gdi_open.3f
SccsID=@(#)gdi_open.3f	16.3 8/19/93
..
.SH NAME
.PP
gdi_open \- establish a connection to the database
.SH SYNOPSIS
.PP
.nf
.ta 8 16
\fB#include "gdi_f77.h"\fP
.sp
\fBinteger function gdi_open (vendor, account, password, database, server, appname)\fP
\fBcharacter	vendor\fP	(i) database vendor 
\fBcharacter	account\fP	(i) database account 
\fBcharacter	password\fP	(i) account password 
\fBcharacter	database\fP	(i) database or machine 
\fBcharacter	server\fP	(i) database server  
\fBcharacter	appname\fP	(i) application name  
.fi
.SH DESCRIPTION
.PP
gdi_open() opens a database connection to the specified database vendor.
More than one connection may be established, including a mix of database
vendors.
.SH ARGUMENTS
.PP
.TP 12
.B vendor
Character string containing the name of the database vendor.  Currently
supported vendors are "oracle" and "postgres".
.TP 12
.B account
Character string containing the database account or user name.  ORACLE
account names may include the password or the entire ORACLE Version 6
database connect string; for example, \fIgdidemo/gdidemo\fP or
\fIgdidemo/gdidemo@t:skrymir:dev\fP.
.TP 12
.B password
Character string containing the account password.  May be an empty string,
"", for ORACLE if the \fIaccount\fP argument includes the password.
.TP 12
.B database
Character string containing the database for SYBASE or POSTGRES or the
SQL*Net connect string (\fIi.e.,\fP t:skrymir:dev) for ORACLE.  May be an
empty string, "", for ORACLE if the connect string is included in the
\fIaccount\fP argument, or if either the TWO_TASK or ORACLE_SID environment
variables are set.  If an empty string for SYBASE, the user's default
database is opened.
.TP 12
.B server
Name of the database server (only used by SYBASE).
.TP 12
.B appname
Application name (only used by SYBASE).
.SH SAMPLE CODE
.PP
See \fIgdi_f77_{ora | pg}_test\fP in 
libsrc/libgendb/test/{ oracle | postgres}.
.SH DIAGNOSTICS
.PP
If the attempt to open a connection fails, the database connection handle,
\fIconn\fP, will be GDI_NOCONN.
.SH FILE
.PP
gdi_f77_conn.c
.SH NOTES
.PP
The SYBASE and INGRES interfaces have not been implemented yet.
.SH SEE ALSO
.PP
.BR gdi_close (3f),
.BR gdi_open (3)
.SH AUTHOR
.PP
H. Turner, SAIC Geophysical Systems Operation, Open Systems Division


