I created a simple DLL in VB 6.0 & successfully registered it with the
following command at the Command Prompt:
regsvr32 c:\Inetpub\wwwr oot\FetchRecord s.dll
I am accessing the DLL in an ASP page with the following code:
<%
Dim strProduct
strProduct=Requ est.QueryString ("product")
Dim objProduct
Set objProduct=Serv er.CreateObject ("FETCH.RECORDS ")
objProduct.setS tring(strProduc t)
Response.Write( "Price of " & strProduct & " is $")
Response.Write( objProduct.retr ieveRecords())
Set objProduct=Noth ing
%>
But the above code, when executed, throws a "Invalid ProgID" error.
Where am I going wrong? Please note that registering the DLL using
regsvr32 throws a
DllRegisterServ er in c:\Inetpub\wwwr oot\FetchRecord s.dll succeeded.
message implying that the DLL has registered successfully. In order to
ensure that the component has really been installed in my system, I
executed the following script:
<%
If(IsObject(Ser ver.CreateObjec t("FETCH.RECORD S"))) Then
Response.Write( "Component Installed!")
Else
Response.Write( "Component Not Installed!")
End If
%>
but strangely, the above script also generates the "Invalid ProgID"
error. Why so though the DLL has registered successfully (as the DOS
message suggests)?
Lastly, can DLLs be created using VS.NET 7.0 in the same way as they
can be created using VB 6.0?
Thanks,
Arpan
following command at the Command Prompt:
regsvr32 c:\Inetpub\wwwr oot\FetchRecord s.dll
I am accessing the DLL in an ASP page with the following code:
<%
Dim strProduct
strProduct=Requ est.QueryString ("product")
Dim objProduct
Set objProduct=Serv er.CreateObject ("FETCH.RECORDS ")
objProduct.setS tring(strProduc t)
Response.Write( "Price of " & strProduct & " is $")
Response.Write( objProduct.retr ieveRecords())
Set objProduct=Noth ing
%>
But the above code, when executed, throws a "Invalid ProgID" error.
Where am I going wrong? Please note that registering the DLL using
regsvr32 throws a
DllRegisterServ er in c:\Inetpub\wwwr oot\FetchRecord s.dll succeeded.
message implying that the DLL has registered successfully. In order to
ensure that the component has really been installed in my system, I
executed the following script:
<%
If(IsObject(Ser ver.CreateObjec t("FETCH.RECORD S"))) Then
Response.Write( "Component Installed!")
Else
Response.Write( "Component Not Installed!")
End If
%>
but strangely, the above script also generates the "Invalid ProgID"
error. Why so though the DLL has registered successfully (as the DOS
message suggests)?
Lastly, can DLLs be created using VS.NET 7.0 in the same way as they
can be created using VB 6.0?
Thanks,
Arpan
Comment