Re: Problem: DLL VB6 / ASP / Database / Windows 2003
- From: "Norman Yuan" <FakeName@xxxxxxxxxxxxx>
- Date: Fri, 16 Jan 2009 16:23:02 -0700
Since the code run in ASP/IIS needs to access other resources (database here) in your second case, the user account configured in IIS for the ASP must have permission to access the said database (what DB is it?). Have you looked into this?
"Juan Marcial" <eslender2007@xxxxxxxxxxx> wrote in message news:ECD3B225-DEF2-4706-9D07-F4C92BBC81F6@xxxxxxxxxxxxxxxx
Hi everyone
Description with sample:
I build a simple DLL in VB6 (Windows 2003)
Say Proyect1, Class1...
Class1 code:
Public Function Sum(X, Y)
Sum = X + Y
End Function
(I use only Variants due to I will call from ASP)
Next, I publish this ASP in any site of IIS, say site1
<%
‘ test1.asp
Dim o
Set o = CreateObject("Project1.Class1")
Response.Write "Sum :" & o.Sum(7, 8)
Set o = Nothing
%>
I run:
http://localhost/site1/test1.asp
Works fine: IE shows 15
…All is right to here
I add any function in class1 that query any dtabase, say
Public Function DataTest()
Dim rs As Recordset
Set rs = New Recordset
rs.Open "select * from Table", “Provider=…”, adOpenStatic
DataTest = rs.Fields(0).Value
rs.Close
End Function
I test this function in VB environment and works fine.
I follow…
<%
‘ test2.asp
Dim o
Set o = CreateObject("Project1.Class1")
Response.Write "DataTest :" & o. DataTest
Set o = Nothing
%>
I run:
http://localhost/site1/test2.asp
Does not works: IE shows error 500
Why?
The Wondows 2003's IIS locks database?
Suggestions…
Notes.
The same sample works fine in Windows 2000
--
Juan Marcial
Software Engineer
.
- References:
- Problem: DLL VB6 / ASP / Database / Windows 2003
- From: Juan Marcial
- Problem: DLL VB6 / ASP / Database / Windows 2003
- Prev by Date: Re: Why the difference in these 2 SQLite files?
- Next by Date: Re: Problem: DLL VB6 / ASP / Database / Windows 2003
- Previous by thread: Problem: DLL VB6 / ASP / Database / Windows 2003
- Next by thread: Re: Problem: DLL VB6 / ASP / Database / Windows 2003
- Index(es):
Relevant Pages
|
Loading