Microsoft KB Archive/105363

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 18:49, 18 July 2020 by 3155ffGd (talk | contribs) (importing KB archive)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

FIX: dbcursor() Fails with 10030 When Updating Character Value

PSS ID Number: Q105363 Article last modified on 01-24-1995

4.20 | 4.20 | 4.20


The information in this article applies to:
- Microsoft SQL Server Programmer’s Toolkit, version 4.2

BUG# 9516 (4.20.00)


When attempting to update or insert a value into a char or varchar column using cursors, the dbcursor() function fails with error 10030:

Invalid parameter in DB-Library function reference.


The function dbcursor() will reject attempts to insert or update columns in SQL Server with character values that contains the following reserved SQL keywords:

  • update
  • where
  • insert

unless the first character of the reserved keyword is the first character in the string to be inserted. For example, using the SQLCURS sample program, the following SET statements will fail:

SET au_lname = “jack where jack” SET au_lname = " where jack"

However, the au_lname field can be successfully updated with the following SET statements:

SET au_lname = “jack wh”+“ere jack” SET au_lname = “where jack”


If the desired character value contains reserved keywords, it may be necessary to use two concatenated strings for the value to be inserted, such that the reserved keyword is split up. If use of string concatenation is not practical, it may be necessary to use non-cursored methods to insert the new value, such as dbcmd() and dbsqlexec().


Microsoft has confirmed this to be a problem in DB-Library version 4.20.00. This problem was corrected in DB-Library version 4.21.00. For more information, contact your primary support provider.

Additional reference words: 4.20.00 DB-Lib datatype KBCategory: kbprg KBSubCategory: SSrvDB_Lib SSrvProg


Copyright Microsoft Corporation 1995.