EDN Admin
Well-known member
Hi,
Im hoping someone can help me out there. Ive been banging my head against the wall for many days trying to troubleshoot this with no substantial progress.
<span style="text-decoration:underline Problem Summary<br/>
When using DLLs that worked on Server 2000 in our staging Server 2003 system in a Component Services package, they cannot access our SQL Server without getting the following error:
Err.number = 3001<br/>
Err.Source = ADODB.Command<br/>
Err.Description = Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.<br/>
Err.HelpContext = 1240641<br/>
Err.helpfile = C:WindowsHELPADO270.CHM
Taking one of the DLLs out of Component Services and registering it using regsvr32 does allow it to access the SQL server, but does not allow it to access features of the Component Services such as Role Membership checks which are used to grant / deny application
access.
Key Question: What would prevent stored procedures from running when its run within a Component Services application while it works find from a plain-vanilla registered DLL?
<span style="text-decoration:underline Problem Details<br/>
I have three DLLs which were compiled from three separate VB6 projects, all of which are set up in a single Component Services Server application whose identity is set up as a application-assigned domain user. It doesnt matter whether
I use copies of DLLs from the original server or use fresh copies of DLLs recompiled from source code on the target development server. I continue to get the error described above when attempting to call a stored procedure.
<span style="text-decoration:underline Background / Environment <br/>
I am in the process of migrating a critical legacy application from Windows Server 2000 to Windows Server 2003. Both operating systems are 32 bit Standard Edition.
The data source is a Windows Server 2008 system running SQL Server 2008.
This is the same data source thats working with our our Windows Server 2000 system from which were migrating - I cant see how this could be a problem here. For transactions to work, we did set up the required Application Server Role with
Distributed Transaction Coordinator set up for Remote Clients, and Inbound / Outbound Transaction Manager Communication.
<span style="text-decoration:underline Troubleshooting Steps Taken<br/>
I have tried looking up error 3001, "Arguments are of the wrong type..." and cannot seem to find an applicable solution. Almost all solutions I can find suggest changing code to what I already have or making adjustments to the web
server where there are problems, where I do not see problems.
The only thing that seemed to get a little traction was registering one DLL outside Component Services which allowed SQL access, which isnt a solution since it needs to access different features of the Component Services object which it should
be part of.
Attempts at debugging the COM+ application have not been successful due to error in the IDE stating, "The class is configured to run as a security ID different from the caller."
<span style="text-decoration:underline Code Triggering Error <br/>
Taking a manual approach to troubleshooting, below is one case where database access fails when the user opens the web application and subsequent SQL lookup code is executed to get the persons name, employee ID, etc. The bold items below is what I suspect
is near the offending code:
Dim cmd As Command<br/>
Set cmd = New Command<br/>
<br/>
With cmd<br/>
.ActiveConnection = cn <br/>
.CommandType = adCmdStoredProc <br/>
.CommandText = "sprNTLogin" <br/>
.Parameters.Append .CreateParameter("@NTLogin", adVarChar, _ <br/>
adParamInput, 50, mstrNTLoginName) <br/>
.Parameters.Append .CreateParameter("@EmpID", adVarChar, _ <br/>
adParamOutput, 10) <br/>
.Parameters.Append .CreateParameter("@UserName", adVarChar, _ <br/>
adParamOutput, 101) <br/>
.Execute <br/>
If EmpID is null, it means there is no record for this user name.<br/>
Raise an error.<br/>
If IsNull(.Parameters("@EmpID")) Then<br/>
Err.Raise ERR_NOSUCHEMPID, ERRORSOURCE, _<br/>
ERR_NOSUCHEMPID_MSG & mstrNTLoginName<br/>
End If<br/>
If its not null, assign the EmpID param to the EmpID property<br/>
mstrEmpID = .Parameters("@EmpID")<br/>
The user name could conceivably be null, so dont raise an error if<br/>
it is.<br/>
If Not IsNull(.Parameters("@UserName")) Then<br/>
mstrUserName = .Parameters("@UserName")<br/>
End If<br/>
End With
Why no bold after <span style="text-decoration:underline .Execute? When attempting to run this, I used the SQL Server Profiler to monitor on our SQL server to watch connection attempts on our database. Where a connection
could be successfully logged from our working system, there was no activity logged when this ran from our new system.
Any help would be greatly appreciated!
Thanks,
-Chris <hr class="sig -Chris
View the full article
Im hoping someone can help me out there. Ive been banging my head against the wall for many days trying to troubleshoot this with no substantial progress.
<span style="text-decoration:underline Problem Summary<br/>
When using DLLs that worked on Server 2000 in our staging Server 2003 system in a Component Services package, they cannot access our SQL Server without getting the following error:
Err.number = 3001<br/>
Err.Source = ADODB.Command<br/>
Err.Description = Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.<br/>
Err.HelpContext = 1240641<br/>
Err.helpfile = C:WindowsHELPADO270.CHM
Taking one of the DLLs out of Component Services and registering it using regsvr32 does allow it to access the SQL server, but does not allow it to access features of the Component Services such as Role Membership checks which are used to grant / deny application
access.
Key Question: What would prevent stored procedures from running when its run within a Component Services application while it works find from a plain-vanilla registered DLL?
<span style="text-decoration:underline Problem Details<br/>
I have three DLLs which were compiled from three separate VB6 projects, all of which are set up in a single Component Services Server application whose identity is set up as a application-assigned domain user. It doesnt matter whether
I use copies of DLLs from the original server or use fresh copies of DLLs recompiled from source code on the target development server. I continue to get the error described above when attempting to call a stored procedure.
<span style="text-decoration:underline Background / Environment <br/>
I am in the process of migrating a critical legacy application from Windows Server 2000 to Windows Server 2003. Both operating systems are 32 bit Standard Edition.
The data source is a Windows Server 2008 system running SQL Server 2008.
This is the same data source thats working with our our Windows Server 2000 system from which were migrating - I cant see how this could be a problem here. For transactions to work, we did set up the required Application Server Role with
Distributed Transaction Coordinator set up for Remote Clients, and Inbound / Outbound Transaction Manager Communication.
<span style="text-decoration:underline Troubleshooting Steps Taken<br/>
I have tried looking up error 3001, "Arguments are of the wrong type..." and cannot seem to find an applicable solution. Almost all solutions I can find suggest changing code to what I already have or making adjustments to the web
server where there are problems, where I do not see problems.
The only thing that seemed to get a little traction was registering one DLL outside Component Services which allowed SQL access, which isnt a solution since it needs to access different features of the Component Services object which it should
be part of.
Attempts at debugging the COM+ application have not been successful due to error in the IDE stating, "The class is configured to run as a security ID different from the caller."
<span style="text-decoration:underline Code Triggering Error <br/>
Taking a manual approach to troubleshooting, below is one case where database access fails when the user opens the web application and subsequent SQL lookup code is executed to get the persons name, employee ID, etc. The bold items below is what I suspect
is near the offending code:
Dim cmd As Command<br/>
Set cmd = New Command<br/>
<br/>
With cmd<br/>
.ActiveConnection = cn <br/>
.CommandType = adCmdStoredProc <br/>
.CommandText = "sprNTLogin" <br/>
.Parameters.Append .CreateParameter("@NTLogin", adVarChar, _ <br/>
adParamInput, 50, mstrNTLoginName) <br/>
.Parameters.Append .CreateParameter("@EmpID", adVarChar, _ <br/>
adParamOutput, 10) <br/>
.Parameters.Append .CreateParameter("@UserName", adVarChar, _ <br/>
adParamOutput, 101) <br/>
.Execute <br/>
If EmpID is null, it means there is no record for this user name.<br/>
Raise an error.<br/>
If IsNull(.Parameters("@EmpID")) Then<br/>
Err.Raise ERR_NOSUCHEMPID, ERRORSOURCE, _<br/>
ERR_NOSUCHEMPID_MSG & mstrNTLoginName<br/>
End If<br/>
If its not null, assign the EmpID param to the EmpID property<br/>
mstrEmpID = .Parameters("@EmpID")<br/>
The user name could conceivably be null, so dont raise an error if<br/>
it is.<br/>
If Not IsNull(.Parameters("@UserName")) Then<br/>
mstrUserName = .Parameters("@UserName")<br/>
End If<br/>
End With
Why no bold after <span style="text-decoration:underline .Execute? When attempting to run this, I used the SQL Server Profiler to monitor on our SQL server to watch connection attempts on our database. Where a connection
could be successfully logged from our working system, there was no activity logged when this ran from our new system.
Any help would be greatly appreciated!
Thanks,
-Chris <hr class="sig -Chris
View the full article