This paper develops a data-driven algorithm to solve an infinite-horizon partially observed linear quadratic stochastic optimal control problem. The optimal control of this problem is related to an algebraic Riccati equation (ARE) and a filtering equation. First, we prove that the solution of a Riccati-type ordinary differential equation (ODE) converges to the unique positive semidefinite solution of the ARE. Next, we establish some data-based relationships among the system input, the system state and certain matrices that appear in the Riccati-type ODE and the filtering equation. Then, using these relationships, we design a data-driven algorithm to approximate the positive semidefinite solution of the ARE and the optimal control. The main feature of this algorithm is that it does not need the information of two system coefficients. Finally, we prove the convergence of the obtained algorithm and demonstrate its effectiveness by simulating a concrete example.