# Access:File.Fetch() set Timeout for MS SQL

**URL:** <https://clarionhub.com/t/access-file-fetch-set-timeout-for-ms-sql/6381>\
**Category:** questions\
**Tags:** sql\
**Created:** [July 12, 2023, 12:04pm UTC](https://clarionhub.com/t/access-file-fetch-set-timeout-for-ms-sql/6381 "2023-07-12T12:04:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaybyjay](https://clarionhub.com/letter_avatar_proxy/v4/letter/j/13edae/32.png) [@jaybyjay](https://clarionhub.com/u/jaybyjay)\
**Post date:** [July 12, 2023, 12:04pm UTC](https://clarionhub.com/t/access-file-fetch-set-timeout-for-ms-sql/6381/1 "2023-07-12T12:04:56Z")

</div>

Is there any way to set a timeout on a request to fetch a record in clarion or MSSQL? A connection timeout is simple but a record read timeout is eluding me.

---

<div class="post-metadata">

**Author:** ![seanh](https://clarionhub.com/letter_avatar_proxy/v4/letter/s/4af34b/32.png) [@seanh](https://clarionhub.com/u/seanh)\
**Post date:** [July 15, 2023, 1:00am UTC](https://clarionhub.com/t/access-file-fetch-set-timeout-for-ms-sql/6381/2 "2023-07-15T01:00:58Z")

</div>

That would be a blocking lock, or a deadlock timeout. I know some backends allow that to be set. Not sure about MSSQL

---

<div class="post-metadata">

**Author:** ![JonW](https://clarionhub.com/user_avatar/clarionhub.com/jonw/32/1344_2.png) [@JonW](https://clarionhub.com/u/JonW)\
**Post date:** [July 17, 2023, 11:43am UTC](https://clarionhub.com/t/access-file-fetch-set-timeout-for-ms-sql/6381/3 "2023-07-17T11:43:47Z")

</div>

[https://www.mssqltips.com/sqlservertip/6290/sql-server-update-lock-and-updlock-table-hints/](https://www.mssqltips.com/sqlservertip/6290/sql-server-update-lock-and-updlock-table-hints/)

might help some. Also look at WAITFOR.

I think I’d worry that there were some badly written programs accessing the data if this is a situation you felt you had to code for. Things that lock data for substantial periods of time are normally batch processes that run in the middle of the night.
