The Associated Press identified more than 40 cases of database misuse in Michigan that resulted in some form of discipline, in records provided by the Michigan State Police.

Among the cases detailed in the documents: A Dearborn officer accused of using a database to learn information about a girlfriend’s former husband.

A Detroit officer accused of searching on his cousin, who could be overheard talking about it during a wiretap investigation.

And a Michigan State Police dispatcher who retired after admitting to querying a confidential law enforcement database dozens of times over 15 years and selling personal information to attorneys, according to the reports.

The names of the officers were redacted, but the reports show how the misuse was discovered and investigated.

The violations concern misuse of Michigan’s Law Enforcement Information Network, which is meant exclusively for law enforcement agencies and holds a host of sensitive criminal justice records. The violations fit a pattern seen nationwide, with many improperly accessing data during romantic entanglements, for purely personal purposes or at the request of family members.

One Michigan case involves a Mount Morris police officer accused of using the system at least seven times to get home address information for women he found attractive, according to the state records. At least once, he made a traffic stop for no reason other than to meet the driver. Authorities said they investigated after a waitress filed a complaint about his unwanted attention.

An FBI agent was reprimanded for asking an employee in the Detroit office to run a search on his brother after the brother was detained at an airport, the reports show.

All told, the AP’s review found that officers across the country have misused law enforcement databases hundreds of times in the past few years to look up information on ex-romantic partners, relatives, celebrities and others.