Login Property

Applies to TestComplete 15.63, last modified on April 10, 2024

Description

Use the DBTable.Login property to obtain or specify the user name, which TestComplete will use to connect to the database, whose data should be compared with the DBTable project element that corresponds to the DBTable object.

Declaration

DBTableObj.Login

Read-Write Property String
DBTableObj An expression, variable or parameter that specifies a reference to a DBTable object

Applies To

The property is applied to the following object:

Property Value

String that specifies the user name.

Example

The code below specifies the connection parameters (password and login) that will be used to connect to a database. After that, the routine connects to this database using the specified parameters and compares the database content with stored data.

JavaScript, JScript

function ConnectionParameters()
{
  // Specifies a DB Table element
  var DBTab = DBTables.Table1;
  
  // Specifies the connection parameters
  DBTab.Password = "123";
  DBTab.Login = "Tester";
  // Connects to the database and compares
  // its content with stored data
  DBTab.Check;
  
}

Python

def ConnectionParameters():
  # Specifies a DB Table element 
  DBTab = DBTables.Table1
  # Specifies the connection parameters
  DBTab.Password = "123"
  DBTab.Login = "Tester"
  # Connects to the database and compares
  # its content with stored data
  DBTab.Check()

VBScript

Sub ConnectionParameters

  ' Specifies a DB Table element
  Set DBTab = DBTables.Table1
  
  ' Specifies the connection parameters
  DBTab.Password = "123"
  DBTab.Login = "Tester"
  ' Connects to the database and compares
  ' its content with stored data
  DBTab.Check
  
End Sub

DelphiScript

function ConnectionParameters();
var DBTab;
begin

  // Specifies a DB Table element
  DBTab := DBTables.Table1;
  
  // Specifies the connection parameters
  DBTab.Password := '123';
  DBTab.Login := 'Tester';
  // Connects to the database and compares
  // its content with stored data
  DBTab.Check;
  
end;

C++Script, C#Script

function ConnectionParameters()
{
  // Specifies a DB Table element
  var DBTab = DBTables["Table1"];
  
  // Specifies the connection parameters
  DBTab["Password"] = "123";
  DBTab["Login"] = "Tester";
  // Connects to the database and compares
  // its content with stored data
  DBTab["Check"];
  
}

See Also

About Database Checkpoints
Password Property
ConnectionString Property

Highlight search results