473,411 Members | 2,030 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

Set passwork works from 2000 Server but not 2003 Server

Hello,

We use a SQL Server database to manage accounts in AD via a COM object
using ADSI written in VB6.
I have to move this database to a new server. The only real difference
between the two servers is that one is running Windows 2000 Server and
the other is running Windows 2003 Server. Both are running SQL Server
2000.
Everything works on both servers, including ChangePassword. The only
things that works on the old server but not the new is SetPassword. It
gives me the error #2147023570 - "One or more input parameters are
invalid"
Again, running the exact same code works on the 2000 machine, and
ChangePassword works on both. The code is fairly simple:

Dim oNameSp As IADsOpenDSObject
Dim oContanr As IADsContainer
Dim oUser As IADsUser

Dim objpth As String

objpth = GetPath(<user cn>, "user") ' returns the path to the user
If Left(objpth, 7) = "LDAP://" Then
Set oNameSp = GetObject("LDAP:")
Set oContanr = oNameSp.OpenDSObject(objpth, <domain admin
name>,<admin pwd>, 0)
Set oUser = oContanr.GetObject("user", "cn=" & <user cn>)
oUser.SetPassword newpwd
End If

Replace "oUser.SetPassword newpwd" with "oUser.ChangePassword oldpwd,
newpwd" and it works.
Any ideas would be appreciated.

Aug 18 '06 #1
0 1122

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ken Lindner | last post by:
I have a need to become familiar with SQL Server 2000 for work. Needless to say I am new to SQL Server any version, but not IT in general. My employer has provided me with the SQL Server 2000...
2
by: Jay Chan | last post by:
We have just installed a SQL Server 2000 (SP 3A) onto a computer that has Windows-2003 Server on it. Now, we cannot get access to that database server from other computers. Seem like this may be an...
0
by: Grant | last post by:
I've cross-posted this in the COM+ group as well - apologies if that's a no-no. But the problem might be caused by either... interop or just plain COMAdmin....
6
by: Martin Holmgaard | last post by:
I have written the following function to be used for flood filling in a bitmap. The function works fine on Windows XP Prof and Windows 2000 server, but on Windows 2003 server it return a stack...
3
by: patrickkellogg | last post by:
I have this code when you click the buttom is suppose to add a job history. it works with firefox, opera, but not ie. (please note - new entries don't have all the elements in them yet, but...
6
by: nild | last post by:
Hello i have a strange problem. I'm using LogonUser to impersonate the user under which my program must run. On Win XP or Server 2003 it works. But on 2000 it doesn't. So i found out, to set...
4
by: MMCI | last post by:
I am new to Infopath 2003, SQL server 2000 and SQL server 2003. I am calling up a stored procedure with 2 variables from jscript in infopath 2003 to run a stored procedure in SQL server 2003 to copy...
3
by: Jim Richards | last post by:
When I print out the Help files for an error, it says: "1. Make sure that the Web server computer is running a server version of Windows 2000, Windows XP, or Windows Server 2003. At this point,...
2
by: orandov | last post by:
Hi, I am having a problem connecting my .net applications from the application server to the database server. When I run the application from my windows xp (sp2) box it works fine. When I try to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.