Send feedback on this topic.
Teradata.Client.Provider
CloseFile Event



Teradata.Client.Provider Namespace > TdConnection Class : CloseFile Event
The .Net Data Provider for Teradata will raise this event after it has completed sending the contents of a file to the Advanced SQL Engine. The Advanced SQL Engine will request the contents of a file when a DDL statement is executed to create/replace a function (e.g. stored procedure, UDF, UDT) and a file that resides on the client machine is specified.
Syntax
'Declaration
 
Public Event CloseFile As TdCloseFileEventHandler
'Usage
 
Dim instance As TdConnection
Dim handler As TdCloseFileEventHandler
 
AddHandler instance.CloseFile, handler
public event TdCloseFileEventHandler CloseFile
public:
event TdCloseFileEventHandler^ CloseFile
Event Data

The event handler receives an argument of type TdFileEventArgs containing data related to this event. The following TdFileEventArgs properties provide information specific to this event.

PropertyDescription
The name of the file that is requested by the Advanced SQL Engine. The name includes the path.  
The IO.Stream that was used to open the file.  
The type of file that was sent to Teradata (e.g. Source, Include, Object).  
The type of language that was used to write the function(e.g. C, CPP, Java).  
Remarks

An Application can only register with this event once. An InvalidOperationException will be thrown if an applcation attempts to register with this event more than once.

An application is not required to register with this event when executing a DDL statement that requires data to be read from a file.

The provider will raise this event after each file is read. This will enable the application to perform cleanup tasks related to the external file that was processed.

Refer to TdConnection.OpenFile for more information.

Requirements

Target Platforms: Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019

See Also