Description
Use the DBTable.Password
property to obtain or specify the password, 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.Password
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 password.
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
Login Property
ConnectionString Property