home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / database / sybase / 554 < prev    next >
Encoding:
Text File  |  1992-12-22  |  1.5 KB  |  39 lines

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