Now that I have the stupid variable problem fixed I am still having trouble making the DBExecuteSQL() execute. Using the following code I still get the same error (error is -2147352567). Not sure where to go from here but to wait for UDF author to fix.

Thanks

code:
 $NEWPWD = guipassprompt(1,0)		;Call code to get password
if ingroup ("TMT User") or ingroup ("TMW User")=0
$ConnDSN = "DRIVER={SQL Server};SERVER=TRINITY;UID=@UserId;PWD=$GUIPassOld;"
$objConn = DBConnOpen($ConnDSN,,)
while @error
$nul = Messagebox("- CURRENT PASSWORD INCORRECT -", "ERROR",4144)
$NEWPWD = guipassprompt(0,0) ;Call code to get password
$ConnDSN = "DRIVER={SQL Server};SERVER=TRINITY;UID=@UserId;PWD=$GUIPassOld;"
$objConn = DBConnOpen($ConnDSN,,)
loop
$SQL = "sp_password NULL,'$NEWPWD','@UserID'"
$SQLExe = DBExecuteSQL($objConn,$sql,)
if @error <> 0
"Error: "@error
$nul = Messagebox("- ERROR CONTACT ADMIN -", "ERROR",4144)
else
$nul = Messagebox("- PASSWORD CHANGED -", "ALERT",4160)
endif
$close = DBConnClose($objConn)
endif

_________________________
Austin Henderson