home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases.sybase
- Path: sparky!uunet!spool.mu.edu!umn.edu!csus.edu!netcom.com!netcomsv!crenshaw!wall
- From: wall@mcm.com (Steve Wall)
- Subject: Warning - don't repeat my Open Client/C mistake
- Message-ID: <1992Dec23.002016.26975@mcm.com>
- Organization: Mellon Capital Management Corp. San Francisco, CA.
- Date: Wed, 23 Dec 1992 00:20:16 GMT
- Lines: 29
-
- I just wasted quite a bit of time tracking down a bug in an Open
- Client/C program that calls dbfcmd() to post data and/or errors
- to various database tables.
-
- The problem is that there is a limit of 16 (my experience - the
- 4.6 Open Client/C doc dated 8/92 [page 2-99] says 8...) arguments
- that can be handed to each call to dbfcmd(). Well, of course I'm
- cruising right along, add a new column to a table, add the column
- to the Open Client/C program, and OOPS! - the new column doesn't
- post correctly (seems to receive \0 values). No warning from dbfcmd()
- or anything (would be nice...if it uses varags(3), it seems like
- it *could* detect and notify when too many args are passed(?)).
-
- Of course the fix is to split up the SQL to call dbfcmd() twice
- with 16 (8?) or fewer args.
-
- Can someone confirm that the limit is 16 args, not 8? If dbfcmd()
- passes args directly to sprintf() (this is hinted at in the docs),
- then the limit may be libc dependent (I guess).
-
- Oh, and please no comments about not reading the documentation - I'm
- well aware that I should have noted this limitation earlier.
-
- Steve
- --
-
- Steve Wall (wall@mcm.com)
- Mellon Capital Management Corporation
- San Francisco, CA
-