home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 6 / 06.iso / a / a610 / 4.ddi / INCL / SQLHDR.H < prev    next >
Encoding:
C/C++ Source or Header  |  1989-12-08  |  2.7 KB  |  83 lines

  1. /***************************************************************************
  2.  *
  3.  *                    RELATIONAL DATABASE SYSTEMS, INC.
  4.  *
  5.  *  COPYRIGHT (c) 1981-1986 RELATIONAL DATABASE SYSTEMS, INC., PALO ALTO, 
  6.  *  CALIFORNIA.  All rights reserved.  No part of this work covered by the 
  7.  *  copyright hereon may be reproduced or used in any form or by any means 
  8.  *  -- graphic, electronic, or mechanical, including photocopying, 
  9.  *     recording, taping, or information storage and retrieval systems --
  10.  *  without permission of RDS.
  11.  *
  12.  *  Title:    sqlhdr.h
  13.  *  Sccsid:    @(#)sqlhdr.h    4.8    12/8/86    17:31:29
  14.  *  Description:
  15.  *        header file for all embedded sql programs
  16.  *
  17.  ***************************************************************************
  18.  */
  19.  
  20. #ifndef _SQLHDR
  21. #define _SQLHDR
  22.  
  23. #include "sqlda.h"
  24.  
  25.  
  26. typedef struct 
  27.     {
  28.     short _SQCstmttype;            /* SQ_SELECT, SQ_INSERT, etc. */
  29.     short _SQCsqlid;            /* SQL's id for this cursor */
  30.     short _SQCflags;            /* CROPEN, CREOF, CRSINGLE ,CRPREPARE*/
  31.     short _SQCnfields;            /* number of result fields
  32.                      * (number supplied by SQL)
  33.                      */
  34.     short _SQCnibind;            /* number of input args */
  35.     short _SQCnobind;            /* number of output args */
  36.     short _SQCtupcnt;            /* tuples remaining in buffer */
  37.     short _SQCtupsize;            /* length of data expected from
  38.                      * SQL
  39.                      */
  40.     struct sqlvar_struct *_SQCibind;    /* pointer to first in array of 
  41.                      * binding structures for arguments
  42.                      * to be taken from the user
  43.                      * program and sent to SQL;
  44.                      */
  45.     struct sqlvar_struct *_SQCobind;    /* pointer to first in array of
  46.                      * binding structures for values
  47.                      * to be received from SQL and
  48.                      * supplied to the user program;
  49.                      */
  50.     char **_SQCcommand;            /* pointer to ptrs to pieces of
  51.                      * the command 
  52.                      */
  53.     struct sqlvar_struct *_SQCfields;    /* pointer to first in array of
  54.                      * structures describing the data
  55.                      * to be received from SQL;
  56.                      * (fields described by SQL)
  57.                      */
  58.     char *_SQCstrtab;            /* pointer to table of strings - the
  59.                      * names of the attributes to be
  60.                      * received from SQL
  61.                      * (table supplied by SQL)
  62.                      */
  63.     char *_SQCtbuf;            /* tuple buffer */
  64.     char *_SQCtuple;            /* pointer to current tuple within
  65.                      * buffer
  66.                      */
  67.     char *_SQCname;            /* cursor name */
  68.     struct sqlda  *_SQCsqlda;        /* pointer to sqlda */
  69.  
  70.         /* used for scroll cursors */
  71.     long _SQCfirst;            /* rowid of 1st tuple in buffer */
  72.     long _SQClast;            /* rowid of last tuple in buffer */
  73.     } _SQCURSOR;
  74.  
  75.  
  76. typedef struct 
  77.     {
  78.     short _SQSstmttype;            /* SQ_SELECT, SQ_INSERT, etc. */
  79.     short _SQSsqlid;            /* SQL's id for this cursor */
  80.     } _SQSTMT;
  81.  
  82. #endif    /* _SQLHDR */
  83.