Microsoft KB Archive/62854

{|
 * width="100%"|

INF: Size Restrictions for dbsqlexec, dbcmd, and dbfcmd

 * }

Q62854

-

The information in this article applies to:


 * Microsoft SQL Server Programmer's Toolkit, version 4.2

-

There is no size restriction for dbsqlexec. However, the size of the command buffer is in dbcmd. No size limitation for dbsqlexec is present, except that any single call to dbcmd cannot contain a command larger than 64K. The command buffer is a linked list, which has a separate segment allocated each time a new command is added to the list.

The model you are programming with under MS-DOS will restrict the buffer size. Medium model and Windows are limited to 64K for all DB-Library (DB-Lib) memory needs. OS/2 and MS-DOS large model are limited to available selectors/memory or available memory (respectively). Please remember that DB-Lib under OS/2 or MS-DOS large model does not support huge pointers, so any single memory allocation cannot be larger than 64K.

Dbfcmd does have a limitation, as stated in the &quot;Microsoft SQL Server Programmer's Reference.&quot; It is necessary to approximate how long the formatted output string will be before we can actually call the formatting routines [which are the same as those used by sprintf]. The size of the buffer allocated for dbcmd cannot be greater than 1024 characters, or two times the length of the format string.

Additional query words: DB-Lib Windows NT dblib

Keywords : kbprogramming

Issue type :

Technology : kbSQLServSearch kbAudDeveloper kbSQLServPTK420