A Strathclyde Police officer accused of lying to help protect his lover carried out a check on his partner using an official database, a court has heard.
Det Supt Shona Bassano told Glasgow Sheriff Court that Pc Steven Smith searched for his boyfriend David Brydon on the Scottish Intelligence Database.
Pc Smith is alleged to have lied to another officer who was trying to trace Mr Brydon in connection with a robbery.
The policeman denies the charge and another of abusing police data systems.
Pc Smith, from Stepps, North Lanarkshire, is accused of lying to another officer in relation to a theft inquiry where 34-year-old Mr Brydon was the main suspect.
The 30-year-old is alleged to have sent an email to Pc Pamela Grubb telling her that he had interviewed Mr Brydon and he knew nothing about it, which resulted in the case being closed.
Pc Smith is charged with attempting to pervert the course of justice between February and March 2007.
He also faces a charge under the data protection act for accessing police systems to check on Mr Brydon for non-policing purposes.
Det Supt Bassano told the court that she had carried out an audit of the Scottish Intelligence Database using Pc Smith's user number.
This followed reports to Strathclyde Police's Counter Corruption Unit, where she works, relating to Pc Smith.
Det Supt Bassano told the court that every officer has a unique user number which allows them to access police systems and also leaves a record of what each officer has looked at.
The officer said: "Information was received relative to a Pc Smith of criminal association and as a result of that I was asked to carry out an audit to see what that officer had searched for relative to that information.
"The audit process specifically shows me when they logged on and off and what they searched for."
Prosecutor Lorna Revie asked the witness what she found during the audit.
Det Supt Bassano replied: "On an occasion on April 18, 2007, Pc Smith searched for three names - Ryan Cowie, Kevin McKell and David Brydon."
Det Supt Bassano added that several messages would have flashed up on the computer screen before the search was carried out warning Pc Smith only to use the system for official police purposes.
She said: "The system gives you a warning regarding the electronic communications policy, stating that if you do not abide by it you will be in breach of the Data Protection Act and the Official Secrets Act.
"You have to click okay to say that you agree to abide by the policy."
Miss Revie asked: "What is the reason for this?"
The witness replied: "Because of the sensitive information held on the system. It's quite clear that access has to be for policing purposes only."
The court also heard from Det Insp James Dillett, also from the Counter Corruption Unit, who claimed that Pc Smith unlawfully accessed the force's Crime Management System.
Det Insp Dillett said that Pc Smith used the system to look seven times at the crime report for the theft Mr Brydon was suspected of committing.
The inspector was carrying out audits in relation to any reports involving Mr Brydon on the system and claimed that Pc Smith also looked at a report for shoplifting in which Mr Brydon was named.
Prosecutor Lorna Revie asked the witness if he had any comment to make about these viewings.
He replied: "There would appear to be no policing purpose and he appeared to be viewing this data unlawfully."
The trial, before Sheriff John Beckett, continues.