|
 |
asp_databases thread: Component won't run on server
Message #1 by "William Milne" <wmilne01@e...> on Fri, 11 Aug 2000 15:24:54
|
|
Hello
I have a SQL Server7 stored procedure to update a single record in a table.
It works. I also have a dll component which runs the stored procedure. Here
is the code:
Public Sub Amend(ByVal strMotorola_No As Variant, _
ByVal strDescription As Variant, _
ByVal strTrack As Variant, _
ByVal strSerialise As Variant, _
ByVal strPhantom As Variant, _
ByVal strMB As Variant, _
ByVal strECN As Variant, _
ByVal strVendor As Variant, _
ByVal strVendor_No As Variant)
Dim oConn As ADODB.Connection
Dim strConnect As String
Dim cmd1 As ADODB.Command
Set oConn = New ADODB.Connection
Set cmd1 = New ADODB.Command
oConn.Mode = adModeReadWrite
strConnect = "Provider=SQLOLEDB.1;Password=xxx;User ID=webuser1;Initial
Catalog=LORPtest;Data Source=ZEI02SQL01"
oConn.Open strConnect
cmd1.ActiveConnection = oConn
cmd1.CommandType = adCmdStoredProc
cmd1.CommandText = "spAmendComponent"
cmd1.Parameters("@vMotorola_No") = strMotorola_No
cmd1.Parameters("@vDescription") = strDescription
cmd1.Parameters("@vTrack") = strTrack
cmd1.Parameters("@vSerialise") = strSerialise
cmd1.Parameters("@vPhantom") = strPhantom
cmd1.Parameters("@vMB") = strMB
cmd1.Parameters("@vECN") = strECN
cmd1.Parameters("@vVendor") = strVendor
cmd1.Parameters("@vVendor_No") = strVendor_No
cmd1.Execute
End Sub
I have created the dll called 'Component', registered it, and tested it on
my local machine using a vb wrapper .exe as follows:
Private Sub Command1_Click()
Dim CA As Object
Set CA = CreateObject("Component.Amend")
CA.Amend "0000test", "this is fun", "N", "N", "N", "", "NULL", "Sun",
"SS90"
Set CA = Nothing
End Sub
This works as well.
I then copied the dll to the web server, registered it there, copied the
.exe to the server and ran it. I get the following run-time error:
80004005
[DBNMPNTW] ConnectionOpen(CreateFile()).
On one occassion I got error "80040111, Automation error. ClassFactory
cannot supply requested class", but I can't seem to reproduce this. Do I
have missing components on the server ?
My aim is to use this from an ASP application with RDS DataSpace and I'm
almost there. Can anyone help ?
William Milne
Message #2 by smartin@c... on Fri, 11 Aug 2000 15:23:38 -0400
|
|
Did you just copy the DLL to the Web server or did you create an actual
install package in VB that you installed on the server? Most likely, your
Web server is missing one of the project components you reference in the
DLL.
> -----Original Message-----
> From: William Milne
> Sent: Friday, August 11, 2000 11:25 AM
> To: ASP Databases
> Subject: [asp_databases] Component won't run on server
>
>
> Hello
> I have a SQL Server7 stored procedure to update a single
> record in a table.
> It works. I also have a dll component which runs the stored
> procedure. Here
> is the code:
>
> Public Sub Amend(ByVal strMotorola_No As Variant, _
> ByVal strDescription As Variant, _
> ByVal strTrack As Variant, _
> ByVal strSerialise As Variant, _
> ByVal strPhantom As Variant, _
> ByVal strMB As Variant, _
> ByVal strECN As Variant, _
> ByVal strVendor As Variant, _
> ByVal strVendor_No As Variant)
>
>
> Dim oConn As ADODB.Connection
> Dim strConnect As String
> Dim cmd1 As ADODB.Command
>
> Set oConn = New ADODB.Connection
> Set cmd1 = New ADODB.Command
>
> oConn.Mode = adModeReadWrite
> strConnect = "Provider=SQLOLEDB.1;Password=xxx;User
> ID=webuser1;Initial
> Catalog=LORPtest;Data Source=ZEI02SQL01"
> oConn.Open strConnect
>
> cmd1.ActiveConnection = oConn
> cmd1.CommandType = adCmdStoredProc
> cmd1.CommandText = "spAmendComponent"
>
> cmd1.Parameters("@vMotorola_No") = strMotorola_No
> cmd1.Parameters("@vDescription") = strDescription
> cmd1.Parameters("@vTrack") = strTrack
> cmd1.Parameters("@vSerialise") = strSerialise
> cmd1.Parameters("@vPhantom") = strPhantom
> cmd1.Parameters("@vMB") = strMB
> cmd1.Parameters("@vECN") = strECN
> cmd1.Parameters("@vVendor") = strVendor
> cmd1.Parameters("@vVendor_No") = strVendor_No
>
> cmd1.Execute
>
> End Sub
>
> I have created the dll called 'Component', registered it, and
> tested it on
> my local machine using a vb wrapper .exe as follows:
>
> Private Sub Command1_Click()
> Dim CA As Object
> Set CA = CreateObject("Component.Amend")
> CA.Amend "0000test", "this is fun", "N", "N", "N", "",
> "NULL", "Sun",
> "SS90"
> Set CA = Nothing
> End Sub
>
> This works as well.
>
> I then copied the dll to the web server, registered it there,
> copied the
> .exe to the server and ran it. I get the following run-time error:
> 80004005
> [DBNMPNTW] ConnectionOpen(CreateFile()).
>
> On one occassion I got error "80040111, Automation error.
> ClassFactory
> cannot supply requested class", but I can't seem to reproduce
> this. Do I
> have missing components on the server ?
>
> My aim is to use this from an ASP application with RDS
> DataSpace and I'm
> almost there. Can anyone help ?
>
> William Milne
>
Message #3 by "William Milne" <wmilne01@e...> on Mon, 14 Aug 2000 18:50:26
|
|
I have subsequently tried calling the component from server-side VB script
in an ASP page (as a test). This works fine so I don't think this is a
missing component problem. What I am now trying to do is call it from the
client side using JavaScript and RDS as follows:
ds = new ActiveXObject('RDS.DataSpace');
objCA = ds.CreateObject('Component.ClassTest', 'http://zei02web01');
The browser doesn't mind this, but when I try to invoke the objCA method,
(was called 'Amend', now called ClassTest. See original email for code) as
follows:
objCA.Update(strMotorola_No, strDescription, strTrack, strSerialise,
trPhantom, strMB, strECN, strVendor, strVendor_No);
it tells me there is an 'Internet Server Error'.
Can anyone please throw any light on this ? I have been scouring Wrox
'Professional ADO RDS programming with ASP' as well as 'Professional Active
Server Pages 3.0' and can't see an obvious answer.
William Milne
On 08/12/00, "smartin" wrote:
> Did you just copy the DLL to the Web server or did you create an actual
install package in VB that you installed on the server? Most likely, your
Web server is missing one of the project components you reference in the
DLL.
> -----Original Message-----
> From: William Milne
> Sent: Friday, August 11, 2000 11:25 AM
> To: ASP Databases
> Subject: [asp_databases] Component won't run on server
>
>
> Hello
> I have a SQL Server7 stored procedure to update a single
> record in a table.
> It works. I also have a dll component which runs the stored
> procedure. Here
> is the code:
>
> Public Sub Amend(ByVal strMotorola_No As Variant, _
> ByVal strDescription As Variant, _
> ByVal strTrack As Variant, _
> ByVal strSerialise As Variant, _
> ByVal strPhantom As Variant, _
> ByVal strMB As Variant, _
> ByVal strECN As Variant, _
> ByVal strVendor As Variant, _
> ByVal strVendor_No As Variant)
>
>
> Dim oConn As ADODB.Connection
> Dim strConnect As String
> Dim cmd1 As ADODB.Command
>
> Set oConn = New ADODB.Connection
> Set cmd1 = New ADODB.Command
>
> oConn.Mode = adModeReadWrite
> strConnect = "Provider=SQLOLEDB.1;Password=xxx;User
> ID=webuser1;Initial
> Catalog=LORPtest;Data Source=ZEI02SQL01"
> oConn.Open strConnect
>
> cmd1.ActiveConnection = oConn
> cmd1.CommandType = adCmdStoredProc
> cmd1.CommandText = "spAmendComponent"
>
> cmd1.Parameters("@vMotorola_No") = strMotorola_No
> cmd1.Parameters("@vDescription") = strDescription
> cmd1.Parameters("@vTrack") = strTrack
> cmd1.Parameters("@vSerialise") = strSerialise
> cmd1.Parameters("@vPhantom") = strPhantom
> cmd1.Parameters("@vMB") = strMB
> cmd1.Parameters("@vECN") = strECN
> cmd1.Parameters("@vVendor") = strVendor
> cmd1.Parameters("@vVendor_No") = strVendor_No
>
> cmd1.Execute
>
> End Sub
>
> I have created the dll called 'Component', registered it, and
> tested it on
> my local machine using a vb wrapper .exe as follows:
>
> Private Sub Command1_Click()
> Dim CA As Object
> Set CA = CreateObject("Component.Amend")
> CA.Amend "0000test", "this is fun", "N", "N", "N", "",
> "NULL", "Sun",
> "SS90"
> Set CA = Nothing
> End Sub
>
> This works as well.
>
> I then copied the dll to the web server, registered it there,
> copied the
> .exe to the server and ran it. I get the following run-time error:
> 80004005
> [DBNMPNTW] ConnectionOpen(CreateFile()).
>
> On one occassion I got error "80040111, Automation error.
> ClassFactory
> cannot supply requested class", but I can't seem to reproduce
> this. Do I
> have missing components on the server ?
>
> My aim is to use this from an ASP application with RDS
> DataSpace and I'm
> almost there. Can anyone help ?
>
> William Milne
>
Message #4 by Douglas Norvell <DNorvell@S...> on Mon, 14 Aug 2000 17:24:59 -0400
|
|
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C00636.19AD351A
Content-Type: text/plain;
charset="iso-8859-1"
I am not an expert but i have payed around with businees objects on the iis
server. After installing the object on the server there is a registry
"HACK" to allow the object to be called from the browser.... here is a cut
and paste from the vb help files:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@2
Settings for Running Business Objects over HTTP
Settings on the Server:
Register the Business Object.
Add required Business Object Registry entry. Add a key with the progID of
the Business object as the text under the following:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\
Services\W3SVC\Parameters\ADCLaunch.
Settings on the Client:
There are no settings required on the client.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@
Basically you have to manually tell the iis server that the com object is
available for instantiation...
hope this helps LDN
-----Original Message-----
From: William Milne [mailto:wmilne01@e...]
Sent: Monday, August 14, 2000 2:50 PM
To: ASP Databases
Subject: [asp_databases] RE: Component won't run on server
I have subsequently tried calling the component from server-side VB script
in an ASP page (as a test). This works fine so I don't think this is a
missing component problem. What I am now trying to do is call it from the
client side using JavaScript and RDS as follows:
ds = new ActiveXObject('RDS.DataSpace');
objCA = ds.CreateObject('Component.ClassTest', 'http://zei02web01');
The browser doesn't mind this, but when I try to invoke the objCA method,
(was called 'Amend', now called ClassTest. See original email for code) as
follows:
objCA.Update(strMotorola_No, strDescription, strTrack, strSerialise,
trPhantom, strMB, strECN, strVendor, strVendor_No);
it tells me there is an 'Internet Server Error'.
Can anyone please throw any light on this ? I have been scouring Wrox
'Professional ADO RDS programming with ASP' as well as 'Professional Active
Server Pages 3.0' and can't see an obvious answer.
William Milne
On 08/12/00, "smartin" wrote:
> Did you just copy the DLL to the Web server or did you create an actual
install package in VB that you installed on the server? Most likely, your
Web server is missing one of the project components you reference in the
DLL.
> -----Original Message-----
> From: William Milne
> Sent: Friday, August 11, 2000 11:25 AM
> To: ASP Databases
> Subject: [asp_databases] Component won't run on server
>
>
> Hello
> I have a SQL Server7 stored procedure to update a single
> record in a table.
> It works. I also have a dll component which runs the stored
> procedure. Here
> is the code:
>
> Public Sub Amend(ByVal strMotorola_No As Variant, _
> ByVal strDescription As Variant, _
> ByVal strTrack As Variant, _
> ByVal strSerialise As Variant, _
> ByVal strPhantom As Variant, _
> ByVal strMB As Variant, _
> ByVal strECN As Variant, _
> ByVal strVendor As Variant, _
> ByVal strVendor_No As Variant)
>
>
> Dim oConn As ADODB.Connection
> Dim strConnect As String
> Dim cmd1 As ADODB.Command
>
> Set oConn = New ADODB.Connection
> Set cmd1 = New ADODB.Command
>
> oConn.Mode = adModeReadWrite
> strConnect = "Provider=SQLOLEDB.1;Password=xxx;User
> ID=webuser1;Initial
> Catalog=LORPtest;Data Source=ZEI02SQL01"
> oConn.Open strConnect
>
> cmd1.ActiveConnection = oConn
> cmd1.CommandType = adCmdStoredProc
> cmd1.CommandText = "spAmendComponent"
>
> cmd1.Parameters("@vMotorola_No") = strMotorola_No
> cmd1.Parameters("@vDescription") = strDescription
> cmd1.Parameters("@vTrack") = strTrack
> cmd1.Parameters("@vSerialise") = strSerialise
> cmd1.Parameters("@vPhantom") = strPhantom
> cmd1.Parameters("@vMB") = strMB
> cmd1.Parameters("@vECN") = strECN
> cmd1.Parameters("@vVendor") = strVendor
> cmd1.Parameters("@vVendor_No") = strVendor_No
>
> cmd1.Execute
>
> End Sub
>
> I have created the dll called 'Component', registered it, and
> tested it on
> my local machine using a vb wrapper .exe as follows:
>
> Private Sub Command1_Click()
> Dim CA As Object
> Set CA = CreateObject("Component.Amend")
> CA.Amend "0000test", "this is fun", "N", "N", "N", "",
> "NULL", "Sun",
> "SS90"
> Set CA = Nothing
> End Sub
>
> This works as well.
>
> I then copied the dll to the web server, registered it there,
> copied the
> .exe to the server and ran it. I get the following run-time error:
> 80004005
> [DBNMPNTW] ConnectionOpen(CreateFile()).
>
> On one occassion I got error "80040111, Automation error.
> ClassFactory
> cannot supply requested class", but I can't seem to reproduce
> this. Do I
> have missing components on the server ?
>
> My aim is to use this from an ASP application with RDS
> DataSpace and I'm
> almost there. Can anyone help ?
>
> William Milne
>
---
You are currently subscribed to asp_databases
Message #5 by "William Milne" <wmilne01@e...> on Wed, 16 Aug 2000 11:10:34
|
|
Thanks all for your help on this. The problem was as Douglas suggested, the
server registry entry in
hkey_local_machine\system\currentControlSet\Services\w3svc\Parameters\ADCLaunch\
requiring the Prod ID of the dll as a Key. I found the relevant
troubleshooting notes on this in appendix H of 'Professional ADO RDS
Programming' where I was also advised to give the anonymous IIS user
read/execute permissions to the MSADC directory. I also set the MSADC
virtual directory so that all computers were granted access in the 'IP and
domain name restrictions' tab.
On 08/11/00, ""William Milne" wrote:
> Hello
I have a SQL Server7 stored procedure to update a single record in a
table.
It works. I also have a dll component which runs the stored procedure.
Here
is the code:
Public Sub Amend(ByVal strMotorola_No As Variant, _
ByVal strDescription As Variant, _
ByVal strTrack As Variant, _
ByVal strSerialise As Variant, _
ByVal strPhantom As Variant, _
ByVal strMB As Variant, _
ByVal strECN As Variant, _
ByVal strVendor As Variant, _
ByVal strVendor_No As Variant)
Dim oConn As ADODB.Connection
Dim strConnect As String
Dim cmd1 As ADODB.Command
Set oConn = New ADODB.Connection
Set cmd1 = New ADODB.Command
oConn.Mode = adModeReadWrite
strConnect = "Provider=SQLOLEDB.1;Password=xxx;User
ID=webuser1;Initial
Catalog=LORPtest;Data Source=ZEI02SQL01"
oConn.Open strConnect
cmd1.ActiveConnection = oConn
cmd1.CommandType = adCmdStoredProc
cmd1.CommandText = "spAmendComponent"
cmd1.Parameters("@vMotorola_No") = strMotorola_No
cmd1.Parameters("@vDescription") = strDescription
cmd1.Parameters("@vTrack") = strTrack
cmd1.Parameters("@vSerialise") = strSerialise
cmd1.Parameters("@vPhantom") = strPhantom
cmd1.Parameters("@vMB") = strMB
cmd1.Parameters("@vECN") = strECN
cmd1.Parameters("@vVendor") = strVendor
cmd1.Parameters("@vVendor_No") = strVendor_No
cmd1.Execute
End Sub
I have created the dll called 'Component', registered it, and tested it on
my local machine using a vb wrapper .exe as follows:
Private Sub Command1_Click()
Dim CA As Object
Set CA = CreateObject("Component.Amend")
CA.Amend "0000test", "this is fun", "N", "N", "N", "", "NULL", "Sun",
"SS90"
Set CA = Nothing
End Sub
This works as well.
I then copied the dll to the web server, registered it there, copied the
.exe to the server and ran it. I get the following run-time error:
80004005
[DBNMPNTW] ConnectionOpen(CreateFile()).
On one occassion I got error "80040111, Automation error. ClassFactory
cannot supply requested class", but I can't seem to reproduce this. Do I
have missing components on the server ?
My aim is to use this from an ASP application with RDS DataSpace and I'm
almost there. Can anyone help ?
William Milne
|
|
 |