Is it sybase or sql server?
Well. It will work for all except single quote (') itself.
ls_SQLText = 'sp_password ' + sapass + ', ' + newpass + ', ' + is_user
EXECUTE IMMEDIATE :ls_SQLText;
If sapass or newpass consist of single quote then replace single quote with two single quotes ('') then it will work.
Write something like:
ll_pos = pos(sapass, "'")
If ll_pos > 0 then
sapass = replace(sapass, ll_pos , 1, "''") // double quote single quote single quote double quote
end if
You may need to a loop to replace single quotes.
You can also a create a datawindow outof sp_password (d_pass) system proc and then code like this.
datastore lds_sp
lds_sp = create datastore
lds_sp.dataobject = 'd_pass'
lds_sp.SetTransObject(SQLC
lds_sp.Retrieve(sapass , newpass, is_user)
regards-
Main Topics
Browse All Topics





by: Vikas_DixitPosted on 2004-04-08 at 14:53:28ID: 10787546
Hi,
Have you tried using other methods of calling a procedure from PB like declaring it s RPCFUNC on transaction object or the DECLARE/EXECUTE syntax ?
Regards,
VIkas