If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Pervasive.SQL > setting passwords

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-13-08, 17:13
nii cs nii cs is offline
Registered User
 
Join Date: Oct 2008
Posts: 6
setting passwords

hi, i am trying let my users change/edit their password through the application
without using the pcc without any success.
can any person out there be of help.
i tried calling the sp below from the application without success, i figured that the problem is with the variable :setnewpassword which is supposed to hold the password.

CREATE PROCEDURE editpassword(in:setnewpassword varchar(8));

begin
set password = :setnewpassword;
end

this is what the syntax says;
SET PASSWORD = password

password ::= user-defined-name
Reply With Quote
  #2 (permalink)  
Old 10-13-08, 17:41
mirtheil mirtheil is online now
Registered User
 
Join Date: Dec 2001
Posts: 1,026
Why create a procedure for something as simple as setting the password?
Instead of calling the SP with the new password, just call the SET PASSWORD statement directly. There's no advantage to creating and calling a procedure that does one statement.

If calling it directly doesn't work, post the exact error, exact version of PSQL and how the user was created.
__________________
Mirtheil Software
Certified Pervasive Developer
Certified Pervasive Technician
Custom Btrieve/VB development
http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.
Reply With Quote
  #3 (permalink)  
Old 10-15-08, 06:12
nii cs nii cs is offline
Registered User
 
Join Date: Oct 2008
Posts: 6
ok thanks, but when i post it directly from my clarion front end;
usersetup{PROPQL} = 'SET PASSWORD = mypass'
there is no error posted but instead of using the contents of the variable -mypass- e.g 'tinycat' entered by the user to change the password, the variable name -mypass- is rather used to change the password.
Reply With Quote
  #4 (permalink)  
Old 10-15-08, 08:03
mirtheil mirtheil is online now
Registered User
 
Join Date: Dec 2001
Posts: 1,026
That's a Clarion issue, not PSQL issue.
It seems that Clarion isn't replacing the variable name with the contents. I'm not familiar with Clarion, but in VB it would be something like:
mypass = "tinycat"
sSQL = "SET PASSWORD = " & mypass
which would give a statement like the following to the engine:
SET PASSWORD = tinycat
__________________
Mirtheil Software
Certified Pervasive Developer
Certified Pervasive Technician
Custom Btrieve/VB development
http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On