Forum Discussion
Power BI Desktop: Intermittent error “'' is already in use and cannot be used” during refresh
I am a Japanese user and a non-native English speaker, so please excuse any awkward wording.
I will include the original Japanese description below for reference.
I am using Power BI Desktop and encountering an intermittent error during data refresh.
During refresh, the following error occurs with a low but consistent probability (approximately once every five refresh attempts):
'' is already in use and cannot be used.
I am having difficulty identifying the root cause and a permanent solution.
I would appreciate any advice on which part might be problematic and what countermeasures can be taken on the Power BI side.
PC environment
CPU: Intel Core i5-1345U
RAM: 16.0 GB
Storage: 256 GB
OS: Windows 11 Enterprise (24H2)
Power BI Desktop
Version: 2.148.878.0 (64-bit) (October 2025)
Power Query applied steps (excerpt)
1.Source
= Access.Database(File.Contents("\\192.168.xx.xx\folder\file.mdb"), [CreateNavigationProperties = true])
2.Navigation
= Source{[Schema = "", Item = "table1"]}[Data]
3.Changed Type
= Table.TransformColumnTypes(Navigation, {{"LOT_No.1", type text}, ..., {"temp", type text}})
4.Added Custom
= Table.AddColumn(Changed Type, "Year (yyyy)", each [Year] + 2000)
5.Added Custom Column
= Table.AddColumn(Added Custom, "Time (hh:mm)", each Text.Combine({Text.Reverse(Text.Middle(Text.Reverse(Text.From([Time], "ja-JP")),2)), ":", Text.End(Text.From([Time], "ja-JP"), 2)}), type text)
6.Added Custom 1
= Table.AddColumn(Added Custom Column, "Time (hh:mm)_2",each Text.PadStart([#"Time (hh:mm)"], 5, "0"), type text)
7.Inserted Combined Column
= Table.AddColumn(Added Custom 1, "End DateTime", each Text.Combine({Text.From([#"Year (yyyy)"], "ja-JP"), "/", Text.From([Month], "ja-JP"), "/", Text.From([Day], "ja-JP"), " ", [#"Time (hh:mm)_2"]}), type text)
8.Changed Type 1
= Table.TransformColumnTypes(Inserted Combined Column, {{"End DateTime", type datetime}})
9.Removed Errors
= Table.RemoveRowsWithErrors(Changed Type 1,{"LOT_No.1", ..., "End DateTime"})
System configuration and situation
On an on‑premises file server (\192.168.xx.xx), the following files exist:
GTE files: Newly created for each production lot (no overwriting)
MDB file: Continuously updated and overwritten as operations progress
From Power Query in Power BI, both the GTE files and the MDB file are loaded, transformed, combined, and then visualized.
When clicking “Refresh” in Power BI Desktop, the refresh usually completes successfully.
However, approximately one out of five refresh attempts fails with the error.
There are no characters or spaces between the quotation marks ('') in the error message.
Questions
What are the most likely causes of this type of error?
Is there any way to completely prevent this issue using only Power BI Desktop or Power Query, without modifying the source system?
If anyone has experienced a similar issue or knows of official documentation related to this behavior, I would greatly appreciate your advice.
Thank you very much.
【In Japanese】
Power BI Desktop を使用しています。
データ更新時に、「''は既に使用されているため、使用できませんでした。」
というエラーが 低い確率(約5回に1回)で発生し、原因と恒久対策に悩んでいます。
どの部分に問題がある可能性があるのか、また Power BI 側で取れる対策があればご教示いただけますでしょうか。
■ PC環境
CPU:Intel Core i5-1345U
RAM:16.0 GB
ストレージ:256 GB
OS:Windows 11 Enterprise(24H2)
■ Power BI Desktop
バージョン:2.148.878.0 (64-bit)(2025年10月)
■ Power Query で適用しているステップ(抜粋)
1.ソース
= Access.Database(File.Contents("\\192.168.xx.xx\folder\file.mdb"), [CreateNavigationProperties = true])
2.ナビゲーション
= ソース{[Schema = "", Item = "table1"]}[Data]
3.変更された型
= Table.TransformColumnTypes(_table1,{{"LOT_No.1", type text}, ..., {"temp", type text}})
4.変更されたカスタム
= Table.AddColumn(変更された型,"日付年(yyyy)",each [日付年] + 2000)
5.変更されたカスタム列
= Table.AddColumn(追加されたカスタム,"時刻(hh:mm)",each Text.Combine({Text.Reverse(Text.Middle(Text.Reverse(Text.From([時刻], "ja-JP")),2)),":",Text.End(Text.From([時刻], "ja-JP"), 2)}),type text)
6.変更されたカスタム1
= Table.AddColumn(追加されたカスタム列,"時刻(hh:mm)_2",each Text.PadStart([#"時刻(hh:mm)"], 5, "0"),type text)
7.挿入された結合列
= Table.AddColumn(追加されたカスタム1,"終了日時",each Text.Combine({Text.From([#"日付年(yyyy)"], "ja-JP"),"/",Text.From([日付月], "ja-JP"),"/",Text.From([日付日], "ja-JP")," ",[#"時刻(hh:mm)_2"]}),type text)
8.変更された型1
= Table.TransformColumnTypes(挿入された結合列,{{"終了日時", type datetime}})
9.削除されたエラー
= Table.RemoveRowsWithErrors(変更された型1,{"LOT_No.1", ..., "終了日時"})
■ システム構成・状況
社内サーバー(\192.168.xx.xx)上に以下のファイルがあります。
・GTEファイル:製品1ロットごとに新規作成(上書きなし)
・MDBファイル:製造進行に伴い常に更新(上書きあり)
Power BI の Power Query から
・GTEファイル
・MDBファイル
を読み込み、結合・編集後に可視化しています。
Power BI Desktop の「更新」を実行すると、
多くの場合は正常に完了しますが、約5回に1回の確率で以下のエラーが発生します。
''は既に使用されているので、使用できませんでした。
なお、エラーメッセージ中のクォーテーション('')の間には、文字やスペースは一切入っていません。
■ 質問
このエラーはどのような原因で発生する可能性が高いでしょうか?
Power BI Desktop/Power Query 側のみで、完全に再発を防ぐ方法はありますでしょうか?
同様の事象をご存じの方、あるいは公式な情報をご存じの方がいらっしゃいましたら、ご助言いただけますと幸いです。
よろしくお願いいたします。
That error comes from the Access (Jet/ACE) driver, not from Power BI itself. When you open the .mdb through Access.Database, the driver creates an .ldb lock file next to it. If the production system writes to the same .mdb at the moment Power Query tries to acquire the lock, the driver returns "'' is already in use and cannot be used." with an empty pair of quotes, which matches your symptom exactly. The roughly 1 in 5 failure rate also fits, since it only fails when the writer happens to be holding the lock at refresh time.
Power Query has no built-in retry on that lock. The cleanest workaround is to remove the contention by reading from a local copy. Schedule a small task (PowerShell or robocopy) to copy file.mdb from the UNC path to a local folder right before each refresh, then point your Source step at the local copy:
Source = Access.Database(File.Contents("C:\PowerBI\stage\file.mdb"), [CreateNavigationProperties = true])That decouples Power BI from the live writer entirely. If staging is not feasible, the next best option is to migrate the data into SQL Server or another concurrent read backend and connect Power BI there.
If it solved your issue, please mark it as the accepted solution and give it a kudos.
Best regards,
Shai KarmaniHi RH1221 ,
Thanks for reaching out to Microsoft Fabric Community.
To add to the discussion here,Since you were specifically looking for a Power Query side workaround without modifying the source system itself, there are a couple of things worth testing before moving to a local staging approach.
First, try wrapping File.Contents with Binary.Buffer in the Source step:
Source = Access.Database( Binary.Buffer( File.Contents("\\192.168.xx.xx\folder\file.mdb") ), [CreateNavigationProperties = true] )This forces Power Query to read the MDB into memory in a single operation and release the file handle sooner, which can help reduce the lock contention window during refresh.
Another thing worth trying is disabling parallel table loading:
Options -> Current File -> Data Load -> uncheck "Enable parallel loading of tables"
By default, Power BI can open multiple connection handles simultaneously during refresh, and when several queries hit the same MDB at the same time, it may trigger this intermittent locking issue.
An additional option you could test is switching from the OLEDB provider to the ODBC driver. The ODBC connection tends to handle MDB lock file cleanup more cleanly, and this has helped improve stability with intermittent locking issues in similar scenarios. So that may be worth trying if the above changes only partially reduce the failures.
For reference:
Access error "Could not use ; file already in use. (Error 3045)" - Microsoft Q&A
Solved: Not able to connect to MS Access DB as a Source in... - Microsoft Fabric CommunityBinary.Buffer - PowerQuery M | Microsoft Learn
That said, I do agree with the earlier suggestion by Shai_Karmani that the most reliable long term solution is staging the MDB locally or otherwise separating Power BI refreshes from the application's active write cycle. The Binary.Buffer approach can reduce the likelihood of collision, but it cannot fully avoid failures if the source system holds an exclusive lock at refresh time.
Hope this helps. Please reach out for further assistance.
Thank you.
5 Replies
- Shai_Karmani
Super User
That error comes from the Access (Jet/ACE) driver, not from Power BI itself. When you open the .mdb through Access.Database, the driver creates an .ldb lock file next to it. If the production system writes to the same .mdb at the moment Power Query tries to acquire the lock, the driver returns "'' is already in use and cannot be used." with an empty pair of quotes, which matches your symptom exactly. The roughly 1 in 5 failure rate also fits, since it only fails when the writer happens to be holding the lock at refresh time.
Power Query has no built-in retry on that lock. The cleanest workaround is to remove the contention by reading from a local copy. Schedule a small task (PowerShell or robocopy) to copy file.mdb from the UNC path to a local folder right before each refresh, then point your Source step at the local copy:
Source = Access.Database(File.Contents("C:\PowerBI\stage\file.mdb"), [CreateNavigationProperties = true])That decouples Power BI from the live writer entirely. If staging is not feasible, the next best option is to migrate the data into SQL Server or another concurrent read backend and connect Power BI there.
If it solved your issue, please mark it as the accepted solution and give it a kudos.
Best regards,
Shai Karmani - v-veshwara-msft
Community Support
Hi RH1221 ,
Thanks for reaching out to Microsoft Fabric Community.
To add to the discussion here,Since you were specifically looking for a Power Query side workaround without modifying the source system itself, there are a couple of things worth testing before moving to a local staging approach.
First, try wrapping File.Contents with Binary.Buffer in the Source step:
Source = Access.Database( Binary.Buffer( File.Contents("\\192.168.xx.xx\folder\file.mdb") ), [CreateNavigationProperties = true] )This forces Power Query to read the MDB into memory in a single operation and release the file handle sooner, which can help reduce the lock contention window during refresh.
Another thing worth trying is disabling parallel table loading:
Options -> Current File -> Data Load -> uncheck "Enable parallel loading of tables"
By default, Power BI can open multiple connection handles simultaneously during refresh, and when several queries hit the same MDB at the same time, it may trigger this intermittent locking issue.
An additional option you could test is switching from the OLEDB provider to the ODBC driver. The ODBC connection tends to handle MDB lock file cleanup more cleanly, and this has helped improve stability with intermittent locking issues in similar scenarios. So that may be worth trying if the above changes only partially reduce the failures.
For reference:
Access error "Could not use ; file already in use. (Error 3045)" - Microsoft Q&A
Solved: Not able to connect to MS Access DB as a Source in... - Microsoft Fabric CommunityBinary.Buffer - PowerQuery M | Microsoft Learn
That said, I do agree with the earlier suggestion by Shai_Karmani that the most reliable long term solution is staging the MDB locally or otherwise separating Power BI refreshes from the application's active write cycle. The Binary.Buffer approach can reduce the likelihood of collision, but it cannot fully avoid failures if the source system holds an exclusive lock at refresh time.
Hope this helps. Please reach out for further assistance.
Thank you. - v-veshwara-msft
Community Support
Hi RH1221 ,
Just wanted to check if the responses provided were helpful. If further assistance is needed, please reach out.
Thank you. - v-veshwara-msft
Community Support
Hi RH1221 ,
We wanted to kindly follow up regarding your query. If you need any further assistance, please reach out.
Thank you.