PRB: ErrorNum 10034 When Calling SqlSetOpt%()ID: Q81396
|
The optparam$ parameter of the Visual Basic Library for SQL Server
(VBSQL) function SqlSetOpt%() specifies the desired parameter of a
particular option to be set. This parameter must always be passed
to the function as a string enclosed in quotation marks, even in
the case of numeric values. For example, the following line of code
calls the SqlSetOpt%() function and sets the SQLBUFFER option to
100 rows:
Results% = SqlSetOpt%(SqlConn%, SQLBUFFER, "100")
Size$ = "100"
Results% = SqlSetOpt%(SqlConn%, SQLBUFFER, Size$)
ErrorNum 10034
Invalid or out of range dboption parameter
To work around this problem, you can use the LTRIM$ function to strip
off any leading spaces prior to calling SqlSetOpt%(). The following
example works properly:
Size% = 100
Results% = SqlSetOpt%(SqlConn%, SQLBUFFER, LTRIM$(STR$(Size%)))
Keywords : kbinterop SSrvVisB
Version : 4.2
Platform : OS/2
Issue type :
Last Reviewed: March 12, 1999