DBGetConnInfo
ddevName, host, user, network, connStr, start,
state, asyncPB);
long sessID ; is the session ID returned by the DBInit short sessNum ; is the requested session number
long * returnedID ; the session ID
long *version ; is the version number of the database
extension
Str63 ddevName; specifies the name of the database extension Str255 host ; is the host string that was used to initiate communication
Str255 user ; is the user string that was used to initiate communication
Str255 network ; is the name of the network through which the database extension is communicating
with the data server
Str255 connStr; is the connection string that was used to initiate communication
long *start ; is the time, in ticks, at which this session was initiated
OSErr *state ; is a value to provide information about the status of the session
DBAsyncParmBlkPtr asyncPB; is a pointer to the asynchronous parameter
block
session, including
• the version of the database extension
• the name of the host system on which the session is running
• the user name
• the connection string that was used to initiate communication
• the name of the network
• the time at which the session started, in ticks
• the status of the session
In addition, if you include a nonzero value for the sessID parameter when you
call the DBGetConnInfo function, the function returns the name of the database extension. If you use 0 for the sessID parameter and specify the
database extension and session number instead, the function returns the
session ID.
You can use this function to get information about a particular session, or you
can call the function repeatedly, incrementing the session number each time,
to get information about all of the sessions associated with a particular
database extension.
sessID is the session ID that was returned by the DBInit function. sessNum is the session number of the session about which you want
information. You can specify either the session ID or the session
number when you call the DBInit function. If you specify the sessID parameter, use 0 for the sessNum parameter. If you specify the
sessNum parameter, then use 0 for the sessID parameter. If you
specify the sessNum parameter, you must specify a value for the
ddevName parameter as well.
returnedID If you specify the session number and the database extension, then
returnedID parameter
version returns the version number of the database extension that is
currently in use.
ddevName is a string of no more than 63 characters that specifies the name of
the database extension. If you specify 0 for the session ID, you must
include the name of the database extension as well as a session
number. If you specify a valid session ID, then the DBGetConnInfo function returns the name of the database extension in the ddevName
parameter. The name of the database extension is contained in the
database extension file in a resource of type 'STR ' with an ID of 128.
For the Data Access Language database extension provided by Apple,
for example, this string is "DAL".
host is the host string that was used to initiate communication with the
data server.
user user is the user string that was used to initiate communication with the data server.
network is the name of the network through which the database extension is
communicating with the data server. This parameter is an empty
string if you are not communicating through a network.
connStr is the connection string that was used to initiate communication with
the data server
start is the time, in ticks, at which this session was initiated. state returns one of the following values to provide information about the
status of the session:
noErr = 0; no error; ready for more text
rcDBValue = -801; output data available
rcDBError = -802; execution ended in an error
rcDBExec = -805; busy; currently executing query
asyncPB is a pointer to the asynchronous parameter block. If you do not want
to call the function asynchronously, set this parameter to NIL
noErr (0) No error
rcDBBadSessID -(806) Session ID is invalid or database extension name is
invalid
rcDBBadSessNum (-807) Invalid session number
rcDBBadDDev (-808) Couldn't find the specified database extension, or error
occurred in opening database extension
rcDBAsyncNotSupp (-809) The database extension does not support asynchronous
calls
rcDBPackNotInited (-813) The InitDBPack function has not yet been called