Forum Discussion
SmartBear_Suppo
16 years agoSmartBear Alumni (Retired)
Hi!
you need to pass the context as an argument to your class; try creating a constructor as follows:
def sql_instance
def sql_user
def sql_password
def sql_driver
public db_rec_count( context )
{
sql_instance = context.expand( '${#Project#SQL_ServerInstance}' )
sql_user = context.expand( '${#Project#SQL_User}' )
sql_password = context.expand( '${#Project#SQL_Password}' )
sql_driver = context.expand( '${#Project#SQL_Driver}' )
}
and then specify the context when creating;
def recCount = new cws.db_rec_count( context )
..
does that help?
regards!
/Ole
eviware.com
you need to pass the context as an argument to your class; try creating a constructor as follows:
def sql_instance
def sql_user
def sql_password
def sql_driver
public db_rec_count( context )
{
sql_instance = context.expand( '${#Project#SQL_ServerInstance}' )
sql_user = context.expand( '${#Project#SQL_User}' )
sql_password = context.expand( '${#Project#SQL_Password}' )
sql_driver = context.expand( '${#Project#SQL_Driver}' )
}
and then specify the context when creating;
def recCount = new cws.db_rec_count( context )
..
does that help?
regards!
/Ole
eviware.com