Compile DLL Access Denied

SimonRigby_UK
10-03-2001, 08:14 AM
Hello all,

I have scoured thsi and other forums for the answer to what I am sure is a simple question but hey its got me stumped.

I have created an ActiveX DLL in VB6 which will be called by an ASP page. I don't think the details of the DLL are the issue so I wont bore you with what it does. By the way it works both in the ASP page and a test project in VB.

The problem is that I wish to update it but each time I try to compile the DLL again, I get the message Access Denied.

I figure that the DLL is still in use which is where I am confused.

In the DLL I open an ADO connection and recordset and they are closed and set to nothing at termination.

In the ASP page I use server.createobject to create the instance and set it to nothing at the bottom of the script.

I am not using MTX. Iam using VB6 Enterprise, Win98 and PWS.

I have tried:
1) unregistering the component with regsvr32 /u
2) manually deleting the registry keys (both of them).
3) Stopping and restarting PWS.
4) restarting the machine (which works but obviously not satisfactory during development).

Any ideas.

Cheers in advance
Simon Rigby
London UK

Yoda
10-03-2001, 08:47 AM
Have you set the compatibility to binary ? (project properties)
Don't know if it'll help ...

Are you sure no instance whatsoever still exists ?



<font color=green>Do or do not
There is no try</font color=green>

SimonRigby_UK
10-03-2001, 08:53 AM
Nope Im not sure at all.

I have tried compiling it in both Binary and Project compatibility modes to no avail.

VB code of my class is as follows

Option Explicit

Private cn As ADODB.Connection
Private rs As ADODB.Recordset


' Determines if the entered MemberName/Password combination is valid
Public Function ValidateLogin(ByVal strName As String, ByVal strPass As String) As Boolean

Dim strSQL As String

Set cn = New ADODB.Connection
With cn
.Provider = "microsoft.jet.oledb.4.0"
.ConnectionString = App.Path & "\member_site.mdb"
.Open
End With

Set rs = New ADODB.Recordset

strSQL = "select count(*) from tblMembers where MemberName = '" & strName & "' and Password = '" & strPass & "'"

Set rs = cn.Execute(strSQL, , adCmdText)

If rs(0) = 1 Then
ValidateLogin = True
Else
ValidateLogin = False
End If

rs.Close
cn.Close

End Function

ASP IS AS FOLLOWS

&lt;%@Language = "vbscript"%&gt;

&lt;%

set r = server.CreateObject("MemberSite.cLogin")

if r.ValidateLogin(request.form("txtMemberName"), request.form("txtPassword")) = true then
response.write "Yes"
else
response.write "No"
end if

set r = nothing

%&gt;

Thought this might help to see what is happening

Cheers
Simon Rigby
London UK

SimonRigby_UK
10-04-2001, 09:51 AM
ah ha...

According an internet resource PWS is flakey when it comes to letting go of instances that are not packaged with MTS. I have Win2K on my laptop so I will move development to the other machine.

Thanks for the replies anyway.

Hope this might help someone else.

Cheers

Simon Rigby

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum