Urgent-----Why just one user can access the DB?

Results 1 to 2 of 2

Thread: Urgent-----Why just one user can access the DB?

  1. #1
    Join Date
    Dec 1969

    Default Urgent-----Why just one user can access the DB?

    Hello there:<BR> I have a web project: DB is Access, and the server is Windows2000. Whenever a second user try to access the page, there is an error message:<BR>Error Type:<BR>Microsoft OLE DB Provider for ODBC Drivers (0x80004005)<BR>[Microsoft][ODBC Microsoft Access Driver] Could not use &#039(unknown)&#039; file already in use.<BR>//global.asa<BR><BR>In global.asa I wrote the following code:<BR>&#060;SCRIPT LANGUAGE=VBScript RUNAT=Server&#062;<BR>SUB Application_OnStart<BR> Application("ConnectionString") = "DSN=comp490"<BR><BR>END SUB<BR>&#060;/SCRIPT&#062;<BR><BR>&#060;OBJECT RUNAT=Server SCOPE=Session ID=Conn PROGID="ADODB.Connection"&#062;<BR>&#060;/OBJECT&#062;<BR><BR>&#060;SCRIPT LANGUAGE=VBScript RUNAT=Server&#062;<BR>SUB Session_OnStart<BR>Dim strSQL<BR>&#039---- Open ADO connection to database<BR>Conn.Open Application("ConnectionString")<BR>&#039Conn.Curso rLocation = adUseClient<BR>Set Session("Conn") = Conn<BR><BR>&#039 Retrieve Browse database<BR>strSQL = "Select * " _<BR> & "From user us, classified cl, class_category cl_cat " _<BR> & "Where us.user_id = cl.user_id And " _<BR> & "cl.category_id=cl_cat.category_id"<BR> <BR>RS_Browse_Cl.Open strSQL,Conn,1,2<BR>&#039 Store Browse recordset in the Session for later use<BR>Set Session("RS_Browse")= RS_Browse_Cl<BR><BR>END SUB<BR>&#060;/SCRIPT&#062;<BR><BR>&#060;SCRIPT LANGUAGE=VBScript RUNAT=Server&#062;<BR> SUB Session_OnEnd<BR>&#039---- Close ADO connection to database<BR>Session("Conn").Close<BR>Session("RS_U ser").Close<BR><BR>Set Session("Conn") = Nothing<BR>Set Session("RS_User") = Nothing<BR>Session.Abandon<BR>END SUB<BR>&#060;/SCRIPT&#062;<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Urgent-----Why just one user can access the DB

    I didn&#039t read all the code, but your db is probably being locked by the logged user and not by iusr_Machinename.<BR><BR>This is compounded by the fact that you put the recordset into a session variable ; the db is locked until the session ends.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts