Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
549 views
in Technique[技术] by (71.8m points)

c# - Trouble to open XLS file with oledb

When I try to open an xls file, I get this error :

Rhe Microsoft Office Access database engine cannot open or write to the file ''. 
It is already opened exclusively by another user, or you need permission to view and write its data.

I do several access but I close and dispose the connection all the time. It's on my DEV PC. On the server I get this error : Don't have read/write access on the file. This file is on etworkdiskdirectory1Files

I'll use "ACE.OLEDB" because Jet is not running on x64 server.

Any idea ?

Thanks,

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

In my case it was a file stream that had not been closed.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...