Re: Problem: DLL VB6 / ASP / Database / Windows 2003



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

.



Relevant Pages

  • Re: ASP & Databases
    ... I am unable to insert a row in a database using an .asp ... I am running IIS 5.1 that comes with Windows XP. ... : in Control Panel. ...
    (microsoft.public.inetserver.asp.db)
  • Re: export data from asp to .mdb?
    ... I am currently trying to get a simple data submission asp form to export ... dim Name ... Database was successfully updated. ... Dim sMSG ...
    (microsoft.public.inetserver.asp.db)
  • Re: 404 Redirect Question
    ... the database for. ... >>>>So what I want it to do is the 404 page ASP code will look at the page>>name 'Cars_Motorbikes' search the categories database table and pull>>out the category information. ... >>>>So in IIS I tried setting the Custom Errors 404 Message Type as File>>but IIS does not or I can't get this page to process it as ASP to then>>dynamically build the page. ... >>>>The 2nd thing I tried was setting the Message Type as URL. ...
    (microsoft.public.inetserver.asp.general)
  • RE: Questions about asp 3.0 and aspnets differences
    ... mostly regarding the use of forms and database use. ... I have some pages on asp 3.0 that are like this: ... Dim dbconn = New ... i have used the new controls that you just drag and drop ...
    (microsoft.public.dotnet.framework.aspnet)
  • IIS 6.0, windows 2003, VB 6.0, ASP -BinaryRead() Error
    ... A simple ASP webpage in the IIS server 6.0 invokes the T3SessionMgrMQ.dll ... Dim sRawData As String ...
    (microsoft.public.vb.com)

Loading