Is there a way to create an ADO connection to an excel spreadsheet but not lock the file for editing?
By setting the .Mode property of the ADODB.Connection object to 'adReadMode' I can allow multiple users to connect to a file in read-only, however the first user to connect will also still lock the file for the editing. If i were to attempt to open up this spreadsheet manually while a user is connected to it, i would be prompted that the file is in use and I can only access the file in read-only.
Is there any way I can get round this, or is it just something that ADO does no matter how i connect?
I am creating my connection with the following code:
Dim cn As New ADODB.Connection
cn.Mode = adModeRead
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & sFilePath & ";" & _
"Extended Properties=""Excel 8.0; HDR=YES;"""
Thanks in advance
By setting the .Mode property of the ADODB.Connection object to 'adReadMode' I can allow multiple users to connect to a file in read-only, however the first user to connect will also still lock the file for the editing. If i were to attempt to open up this spreadsheet manually while a user is connected to it, i would be prompted that the file is in use and I can only access the file in read-only.
Is there any way I can get round this, or is it just something that ADO does no matter how i connect?
I am creating my connection with the following code:
Dim cn As New ADODB.Connection
cn.Mode = adModeRead
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & sFilePath & ";" & _
"Extended Properties=""Excel 8.0; HDR=YES;"""
Thanks in advance