Writing applications working with DB in GPC