Login | |
|
 |
RE: Changes not saving. - 5/10/2006 8:13:27 AM
|
|
 |
|
| |
ebgreen
Posts: 5069
Score: 31
Joined: 7/12/2005
Status: offline
|
[Set oIADS = GetObject("LDAP://RootDSE") strDefaultNC = oIADS.Get("defaultnamingcontext") Set oIADSUser = GetObject("LDAP://OU=Users,OU=myou,"& strDefaultNC) for each x in oIADSUser On Error Resume Next query = "select * from mytable" set result = sqlConn.execute(query) result.MoveFirst set user = x x.put "description", result("descriptionfield") x.put "telephoneNumber", result("phonefield") x.setinfo If Err.Number <> 0 Then wscript.echo "Error saving" wscript.quit end if next wscript.echo "finish" wscript.quit
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: Changes not saving. - 5/10/2006 8:21:30 AM
|
|
 |
|
| |
ebgreen
Posts: 5069
Score: 31
Joined: 7/12/2005
Status: offline
|
That is why I first said: Do you need to move the record set to the first record before you try to access the data in it? Apparently you don't need to. Next I would ask what purpose this line serves in the code: set user = x
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
| |
|
|
 |
|
 |
|
|