FIX: Message 4805 Returned When Calling SqlBCPExec%()
  
PSS ID Number: Q109854
Article last modified on 10-31-1994
 
4.20
 
WINDOWS
 

----------------------------------------------------------------------
The information in this article applies to:
 
  - Microsoft SQL Server Programmer's Toolkit, version 4.2
----------------------------------------------------------------------
 
BUG# 9415 (4.20.00)
 
SYMPTOMS
========
 
When attempting to bulk-copy data from a system file into a database table
with the SQL Server Development Toolkit for Visual Basic, the call to
SqlBCPExec%() returns the following error message:
 
   Error #: 4805
   The front end tool you are using does not support the feature
   of bulk insert from host, please use the proper tools for this
   command.
 
This occurs even though it is possible to successfully bulk-copy from the
database table to a system file.
 
CAUSE
=====
 
The above error is returned if SqlBcpExec%() is called with the DBIN%
parameter and the login record has not been properly set for bulk-copy
operations.
 
WORKAROUND
==========
 
The following function properly sets the login record:
 
   Results% = SqlBCPSetL%(loginRec%, 1)
 
For versions of VBSQL.VBX earlier than 4.21, the second parameter must be
set to the DB-Library Boolean value of TRUE (1). If this parameter is set
to the BASIC Boolean value of TRUE (-1), the login record will not be
properly set.  VBSQL version 4.21 will allow either TRUE(1) or TRUE(-1) to
be used in order to enable the login record to support bulk-copy
operations.
 
For more information, consult page 106 of the "SQL Server Programmer's
Reference for Visual Basic."
 
STATUS
======
 
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
KBCategory: kbinterop
KBSubCategory: SSrvVisB SSrvBCP SSrvProg
 
=============================================================================
 
Copyright Microsoft Corporation 1994.
