D
Dustin Ventin
I've written an application that utilizes an Access front end, and uses
linked tables to connect to a SQL Server back-end for its data. This
application works perfectly on XP or Server 2003, but begins throwing
problems on Windows Vista.
The error I'm encountering occurs ONLY when I attempt to open a recordset of
data from the application, using the typical recordset code:
Set conn = New ADODB.Connection 'Set up connection to database
Set conn = SetDBConnection
Set rsProject = New ADODB.Recordset 'Set up recordset
rsProject.CursorLocation = adUseClient
rsProject.Open "Yadda Yadda;", conn, adOpenStatic, adLockBatchOptimistic
rsProject.MoveFirst
The SetDBConnection function returns a connection (doing it in one place so
I don't have to write the same code over and over again). The mean of that
function is:
With conn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "data source= " & strBackEndPath() 'SQL Server Version
.Open
End With
This code works perfect on every OS except Vista. With Vista, the moment
the application tries to open any recordset, it throws the error: "Could not
use ''; file already in use."
Now, I strongly suspect due to the OS specific-ness of this error that what
I'm seeing is an issue with Vista permissions. I've tried running it as an
administrator, setting the properties to run the application in administrator
mode, and even set the compatability to Windows XP SP2. Nothing seems to
work, and I'm curious if anyone has any information on how to stake this
issue in the heart once and for all.
Thank you,
Dustin
linked tables to connect to a SQL Server back-end for its data. This
application works perfectly on XP or Server 2003, but begins throwing
problems on Windows Vista.
The error I'm encountering occurs ONLY when I attempt to open a recordset of
data from the application, using the typical recordset code:
Set conn = New ADODB.Connection 'Set up connection to database
Set conn = SetDBConnection
Set rsProject = New ADODB.Recordset 'Set up recordset
rsProject.CursorLocation = adUseClient
rsProject.Open "Yadda Yadda;", conn, adOpenStatic, adLockBatchOptimistic
rsProject.MoveFirst
The SetDBConnection function returns a connection (doing it in one place so
I don't have to write the same code over and over again). The mean of that
function is:
With conn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "data source= " & strBackEndPath() 'SQL Server Version
.Open
End With
This code works perfect on every OS except Vista. With Vista, the moment
the application tries to open any recordset, it throws the error: "Could not
use ''; file already in use."
Now, I strongly suspect due to the OS specific-ness of this error that what
I'm seeing is an issue with Vista permissions. I've tried running it as an
administrator, setting the properties to run the application in administrator
mode, and even set the compatability to Windows XP SP2. Nothing seems to
work, and I'm curious if anyone has any information on how to stake this
issue in the heart once and for all.
Thank you,
Dustin