freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Tom Poindexter <poindexter.tom AT tci.com>
- To: freetds AT franklin.oit.unc.edu
- Subject: Freetds report with Sybtcl + patches
- Date: Mon, 13 Jul 1998 11:39:46 -0600
Freetds with Sybtcl
make: see sybdb.h changes below (not in patch format)
test:
./tclsh:
% set h [sybconnect mysybid mysybpw MYSERVER]
sybtcl0
% sybuse $h
cips
% sybuse $h tempdb
tempdb
% sybsql $h "sp_who"
REG_ROW
% sybcols $h
spid status loginame hostname blk dbname cmd
% puts $sybmsg(collengths)
2 12 12 10 5 10 16
% puts $sybmsg(coltypes)
smallint char char char char char char
% sybnext $h
2 sleeping {} {} 0 master {NETWORK HANDLER}
% sybnext $h
3 sleeping {} {} 0 master {DEADLOCK TUNE}
% sybnext $h
4 sleeping {} {} 0 master {MIRROR HANDLER}
etc.
COOL!! It's working!
I haven't tried things like async, polling, compute columns, sp return
results,
multiple result sets, or image read/write yet. Nor have I tried the
ctlib interface.
Great job so far!
Btw, Sybtcl info is at: http://www.nyx.net/~tpoindex
Tom Poindexter
------sybdb.h changes------------------------------------------------------
1. add missing typedef/defines to sybdb.h: DBUSMALLINT, DBTEXTSIZE, DBRESULT,
DBTXTSLEN
/* sybtcl needs: */
typedef unsigned short DBUSMALLINT ;
/* a large list of options, DBTEXTSIZE is needed by sybtcl */
#define DBPARSEONLY 0
#define DBESTIMATE 1
#define DBSHOWPLAN 2
#define DBNOEXEC 3
#define DBARITHIGNORE 4
#define DBNOCOUNT 5
#define DBARITHABORT 6
#define DBTEXTLIMIT 7
#define DBBROWSE 8
#define DBOFFSET 9
#define DBSTAT 10
#define DBERRLVL 11
#define DBCONFIRM 12
#define DBSTORPROCID 13
#define DBBUFFER 14
#define DBNOAUTOFREE 15
#define DBROWCOUNT 16
#define DBTEXTSIZE 17
#define DBNATLANG 18
#define DBDATEFORMAT 19
#define DBPRPAD 20
#define DBPRCOLSEP 21
#define DBPRLINELEN 22
#define DBPRLINESEP 23
#define DBLFCONVERT 24
#define DBDATEFIRST 25
#define DBCHAINXACTS 26
#define DBFIPSFLAG 27
#define DBISOLATION 28
#define DBAUTH 29
#define DBIDENTITY 30
#define DBNUMOPTIONS 31
/* dbpoll() result codes, sybtcl needs DBRESULT */
#define DBRESULT 1
#define DBNOTIFICATION 2
#define DBTIMEOUT 3
#define DBINTERRUPT 4
/* more sybtcl needs: */
#define DBTXTSLEN 8
2. change sybdb.h BYTE typedef to be in agreement with Sybase (add 'unsigned')
typedef unsigned char BYTE ;
3. add prototypes for functions that don't return integers: dbmonthname,
dbname, dbdata, dbcolname, dbtxptr, dbtxtimestamp
use prototypes from Sybtcl's ctcompat library:
EXTERN char *dbmonthname _ANSI_ARGS_((DBPROCESS *,char *,int,DBBOOL));
EXTERN char *dbname _ANSI_ARGS_((DBPROCESS *));
EXTERN BYTE *dbdata _ANSI_ARGS_((DBPROCESS *,int));
EXTERN char *dbcolname _ANSI_ARGS_((DBPROCESS *,int));
EXTERN DBBINARY *dbtxptr _ANSI_ARGS_((DBPROCESS *,int));
EXTERN DBBINARY *dbtxptr _ANSI_ARGS_((DBPROCESS *,int));
--
-
Freetds report with Sybtcl + patches,
Tom Poindexter, 07/13/1998
- <Possible follow-up(s)>
- Re: Freetds report with Sybtcl + patches, Brian Bruns, 07/13/1998
Archive powered by MHonArc 2.6.24.