Click to See Complete Forum and Search --> : several instances of program need to use one data file
humph
Jul 17th, 2000, 09:09 AM
I have a small executable which uses an excel file as a source for data. The program is such that several instances of it might need to be open at once. But when I open a second instance, I get:"the microsoft jet database engine cannot open ..the excel file..It is already open exclusively or you need permission."
So can anyone tell me how to make the excel file readable by many instances at once?
Thanks!
Clunietp
Jul 17th, 2000, 11:36 AM
Maybe you can link your Excel sheet through MS Access, and have your clients access the MS Access database instead....?
humph
Jul 17th, 2000, 12:23 PM
Thanks, but the aim is to keep the overhead of new programs low - users won't have msaccess
Clunietp
Jul 17th, 2000, 09:34 PM
If you need read/write permissions, it appears that you are S.O.L
If you need read only access, you are OK
This is ADO code
Dim cn As Connection
Set cn = New Connection
cn.Mode = adModeRead
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=sample.xls;Extended Properties=Excel 8.0"
humph
Jul 18th, 2000, 01:18 AM
Thanks Clunietp! I set the data1 object to read only and it works fine. Nice to have the code to do it as well :)
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.