Class ExecuteFileData
This class is useful to automate blob and clob data with DB.
Inheritance
Inherited Members
Namespace: SDBCS.filework
Assembly: SDBCS.dll
Syntax
public class ExecuteFileData
Remarks
Author Mehmet Hayati KINAŞ
Version 1.0
Constructors
ExecuteFileData(RunDB, String[], String, String, String[], Int32[], Int32, Boolean)
The basic variables of the constructor include database, table and file information.
In this way, the connection between the database and file is established and transactions are automated.
Declaration
public ExecuteFileData(RunDB runDB, string[] tableNames, string keyField, string fileField, string[] unqFields, int[] unqFieldTypes, int fileDataType, bool isLocale)
Parameters
Type | Name | Description |
---|---|---|
RunDB | runDB | For connecting the database and executing processes. |
System.String[] | tableNames | The table names to be accessed. |
System.String | keyField | The key field name of the table to access. |
System.String | fileField | The name of file field of the table to access. |
System.String[] | unqFields | Unique fields string array. |
System.Int32[] | unqFieldTypes | Unique field types string array. |
System.Int32 | fileDataType | File data type integer representation. |
System.Boolean | isLocale | Locale language or English |
Fields
BLOB
Declaration
public const int BLOB = 0
Field Value
Type | Description |
---|---|
System.Int32 |
buffer
Declaration
public byte[] buffer
Field Value
Type | Description |
---|---|
System.Byte[] |
CLOB
Declaration
public const int CLOB = 1
Field Value
Type | Description |
---|---|
System.Int32 |
CONNECTIONSTRING
Declaration
public const int CONNECTIONSTRING = 1
Field Value
Type | Description |
---|---|
System.Int32 |
DATAFILEPATH
Declaration
public const int DATAFILEPATH = 0
Field Value
Type | Description |
---|---|
System.Int32 |
fileSF
Declaration
public string fileSF
Field Value
Type | Description |
---|---|
System.String |
isDebug
Declaration
public bool isDebug
Field Value
Type | Description |
---|---|
System.Boolean |
Methods
getErrorString()
For getting errorString
Declaration
public string getErrorString()
Returns
Type | Description |
---|---|
System.String | errorString |
getMessageScript()
For getting messageScript
Declaration
public string getMessageScript()
Returns
Type | Description |
---|---|
System.String | messageScript |
getResultMessage()
For getting resultMessage
Declaration
public string getResultMessage()
Returns
Type | Description |
---|---|
System.String | resultMessage |
setKeyData(String)
For setting key data.
Declaration
public void setKeyData(string keyData)
Parameters
Type | Name | Description |
---|---|---|
System.String | keyData |
setUnqFieldData(String[])
For setting unique field data.
Declaration
public void setUnqFieldData(string[] unqFieldData)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | unqFieldData |
tableAction(String, Boolean)
This method call recordFileToDB class and methods for retrieving and recording file data.
Before calling this method, key or unique data and byte[] buffer(for uploading) must be set.
Declaration
public bool tableAction(string action, bool isKey)
Parameters
Type | Name | Description |
---|---|---|
System.String | action | String representation of form action. It can be insert, update, delete or download. |
System.Boolean | isKey | Boolean representation of if key is exist. |
Returns
Type | Description |
---|---|
System.Boolean | If process is ok it will return true, else return false. |