Find(Param: String): IDalConnectionDescriptorParam;
Param. Parameter name.
The Find method searches for a parameter by its name.
The list of parameters is formed by the Foresight Analytics Platform kernel individually for each driver. Names of parameters specified in the Name parameter can be obtained in the IDalConnectionDescriptorParam.Name property on navigating the current collection of parameters.
There are also some specific parameters influencing their further work:
Parameter name | Description |
CursorMaxBufferSize | Size of the buffer used to work with cursors. Size is specified in bytes. NOTE. The parameter influences only the work with servers based on Oracle DBMS 9.x\10.x\11.x. |
Sub UserProc;
Var
MB: IMetabase;
Driv: IDalDriver;
ConnectDesc: IDalConnectionDescriptor;
Params: IDalConnectionDescriptorParams;
Connect: IDalConnection;
Comand: IDalCommand;
Begin
MB := MetabaseClass.Active;
Driv := New DalOrcl8Driver.Create As IDalDriver;
ConnectDesc := Driv.CreateDescriptor;
Params := ConnectDesc.Params;
Params.Find("User Name").Value := "User";
Params.Find("Password").Value := "Password";
Params.Find("Host BSTR").Value := "OrclServer";
Params.Find("Schema").Value := "Repository";
Params.Find("CursorMaxBufferSize").Value := "1000000";
Connect := ConnectDesc.CreateConnection;
Comand := Connect.CreateCommand;
Comand.SQL := "Select * From Table_1";
Comand.Execute;
Comand.Close;
End Sub UserProc;
After executing the example a new database server connection is created, after assigning four mandatory parameters, the connection to the PPRepository scheme located at the Test server is established. Then the SQL query that selects all records from the Table_1 table is executed. The appropriate parameters are searched by name to assign the values of connection parameters.
See also: