stephenmbell
IS-IT--Management
I am trying to write simple asp page to extract some data out of a database for users to view only. The data is stored in an access db that is typically opened on certain machines throughout our company.
While developing this page, I imported the tables i need into a temporary database and everything worked fine. I have since changed my connection string to the live db and I get the following error...
--
i have a function that returns me a recordset -- I assume this has somethign to do with some sort of locking or exclusive rights -- should I use different constants? is doing what i want to do even possible?
While developing this page, I imported the tables i need into a temporary database and everything worked fine. I have since changed my connection string to the live db and I get the following error...
Code:
Microsoft JET Database Engine (0x80004005)
The Microsoft Jet database engine cannot open the file '\\172.17.1.42\accshare\services\shop services.mdb'. It is already opened exclusively by another user, or you need permission to view its data.
/softwarerollout/includes/udf.asp, line 12
--
i have a function that returns me a recordset -- I assume this has somethign to do with some sort of locking or exclusive rights -- should I use different constants? is doing what i want to do even possible?
Code:
Function fnGetRecordset(strSQL)
'declare local variables
Dim rs
'declare constants
Const adOpenStatic = 3
Const adLockReadOnly = 1
Const adCmdText = 1
'create recordset
Set rs = server.CreateObject("adodb.recordset")
'open recordset
rs.open strSQL, strServicesConnect, adOpenStatic, adLockReadOnly, adCmdText
'set active connection
set objConn = rs.ActiveConnection
'return recordset
set fnGetRecordset = rs
'perform cleanup
set rs = nothing
End Function