Skip to content

piBindFile - cSQLStatement

The default file for file-fetch operations.

Type: Property
Access: Read/Write
Data Type: Integer
Parameters: None

Syntax

Property Integer piBindFile
Access Type Syntax
Read Access: Get piBindFile to IntegerVariable
Write Access: Set piBindFile to IntegerVariable/Value

Description

The piBindFile property stores the default file buffer to use for this statement's file-fetch operations. It should be set to a file number. Whenever the SQLBindFile message is called and the passed file number is 0 (zero), this property will be used.

Sample

The code sample uses three different ways to set the piBindFile property to the Customer file number. One is by using a "normal" connect and explicitly setting the property. The other is by using SQLFileConnect implicitly setting the property. The first two ways set the property at connection level. This implicitly sets the property for all statements that are created for that connection. The last sample sets the property explicitly for one statement.

Handle hoSQLMngr
Handle hdbc hstmt

Object oSQLHandler Is A cSQLHandleManager
    Move Self To hoSQLMngr
End_Object

Send SQLSetConnect Of hoSQLMngr "MSSQLDRV" "SERVER=(local)"
Get SQLConnect Of hoSQLMngr "" "" To hdbc
Set piBindFile Of hdbc To Customer.File_number
Get SQLFileConnect Of hoSQLMngr Customer.File_Number To hdbc
Get SQLOpen Of hdbc To hstmt Set piBindFile Of hstmt To Customer.File_Number