Set the LOGINREC for bulk copy operations into the database.
RETCODE BCP_SETL(loginrec, enable) LOGINREC *loginrec; DBBOOL enable;
This is a pointer to a LOGINREC structure, which will be passed as an argument to dbopen. You can get a LOGINREC structure by calling dblogin.
This is a Boolean value (“true” or “false”) that specifies whether or not to enable bulk copy operations for the resulting DBPROCESS. By default, DBPROCESSes are not enabled for bulk copy operations.
SUCCEED or FAIL.
This macro sets a field in the LOGINREC structure that tells Adaptive Server Enterprise that the DBPROCESS connection may be used for bulk copy operations. To have any effect, it must be called before dbopen, the routine that actually allocates the DBPROCESS structure.
Applications that allow users to make ad hoc queries may want to avoid calling BCP_SETL (or call it with a value of “false” for the enable parameter) to prevent users from initiating a bulk copy sequence through SQL commands. Once a bulk copy sequence has begun, it cannot be stopped through an ordinary SQL command.
BCP_SETL applies to “copy in” operations only.
bcp_init, bcp_getl, dblogin, dbopen, DBSETLAPP, DBSETLHOST, DBSETLPWD, DBSETLUSER