API Reference > imodeljs-backend > iModels > IModelDb > tryPrepareStatement tryPrepareStatement Method Prepare an ECSQL statement. tryPrepareStatement(sql: string): undefined | ECSqlStatement Parameter Type Description sql string The ECSQL statement to prepare Returns - undefined | ECSqlStatement undefined if there is a problem preparing the statement. Defined in core/backend/src/IModelDb.ts Line 973 Last Updated: 12 June, 2024