Reply
Help with ASP and oracle Encryption Procedure
Old 06-01-2007, 05:43 PM Help with ASP and oracle Encryption Procedure
Average Talker

Posts: 25
Name: John
Trades: 0
Hello again,

Need some help bad with the following. Oracle 9.2 have following stored proc
Code:
CREATE OR REPLACE PROCEDURE Decrypt(UserName VARCHAR2,
                                p_decrypted_string OUT VARCHAR2)
                                 
                          
    IS
     key_string          VARCHAR2(8)  := 'scottsco';
     encrypted_string    VARCHAR2(2048);
     decrypted_string    VARCHAR2(2048);
     
   BEGIN
    select u_password into encrypted_string
     from Table1
     where F_Name = UserName;
   
     dbms_obfuscation_toolkit.DESDecrypt(
                      input_string => encrypted_string, 
                      key_string => key_string, 
                      decrypted_string => decrypted_string);
              
     p_decrypted_string := decrypted_string;  
           
   END;
If I run this looks good.

Now I have my asp code as follows to try and connect and retrieve value
Code:
UserName = request.Form("login")
 
oConn.Open
oCmdUserInfo.ActiveConnection = oConn
oCmdUserInfo.CommandType = adCmdStoredProc
oCmdUserInfo.CommandText = "decrypt"

 oCmdUserInfo.Parameters.Append oCmdUserInfo.CreateParameter("UserName", adVarChar, adParamInput, 400, UserName)
 oCmdUserInfo.Parameters.Append oCmdUserInfo.CreateParameter("p_decrypted_string", adVarChar, adParamOutput, 8)
 Set objRsUser = oCmdUserInfo.Execute
 Test = oCmdUserInfo.Parameters("p_decrypted_string").value
 
If objRsUser.EOF Then
  Session("Authenticated") = 0
%>
I run this an keep getting a error at this line
Code:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Oracle][ODBC][Ora]ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'DECRYPT' ORA-06550: line 1, column 7: PL/SQL: Statement ignored 
/test/login.asp, line 111

 
Set objRsUser = oCmdUserInfo.Execute
I also have an include file adovbs.inc.
I or nobody can figure this out. Any ideas experts. Thanks.
HelpR is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 06-01-2007, 11:17 PM Re: Help with ASP and oracle Encryption Procedure
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,674
Name: John Alexander
Trades: 0
I think it's your Test = line. If your sproc returns the data as a select statement, like table data, you won't be able to get it as an output parameter.
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 06-03-2007, 12:35 PM Re: Help with ASP and oracle Encryption Procedure
Average Talker

Posts: 25
Name: John
Trades: 0
Learning Newbie,

Thanks for the response. I have removed the test = line and still receive the same error in Set objRsUser = oCmdUserInfo.Execute. Is there anyway to troubleshoot this? Thanks.
HelpR is offline
Reply With Quote
View Public Profile
 
Old 06-03-2007, 12:43 PM Re: Help with ASP and oracle Encryption Procedure
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,943
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
I'm not familiar with Oracle either (never used it before), but try this:

Set objRsUser = conn.Execute (oCmdUserInfo)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 06-03-2007, 12:50 PM Re: Help with ASP and oracle Encryption Procedure
Average Talker

Posts: 25
Name: John
Trades: 0
Nope same error. It's almost like a recordset is not being returned.
HelpR is offline
Reply With Quote
View Public Profile
 
Old 08-01-2007, 06:44 PM Re: Help with ASP and oracle Encryption Procedure
Junior Talker

Posts: 2
Name: Ruben Valera
Trades: 0
Quote:
Originally Posted by HelpR View Post
Hello again,

Need some help bad with the following. Oracle 9.2 have following stored proc
Code:
CREATE OR REPLACE PROCEDURE Decrypt(UserName VARCHAR2,
                                p_decrypted_string OUT VARCHAR2)
 
 
    IS
     key_string          VARCHAR2(8)  := 'scottsco';
     encrypted_string    VARCHAR2(2048);
     decrypted_string    VARCHAR2(2048);
 
   BEGIN
    select u_password into encrypted_string
     from Table1
     where F_Name = UserName;
 
     dbms_obfuscation_toolkit.DESDecrypt(
                      input_string => encrypted_string, 
                      key_string => key_string, 
                      decrypted_string => decrypted_string);
 
     p_decrypted_string := decrypted_string;  
 
   END;
If I run this looks good.

Now I have my asp code as follows to try and connect and retrieve value
Code:
UserName = request.Form("login")
 
oConn.Open
oCmdUserInfo.ActiveConnection = oConn
oCmdUserInfo.CommandType = adCmdStoredProc
oCmdUserInfo.CommandText = "decrypt"
 
 oCmdUserInfo.Parameters.Append oCmdUserInfo.CreateParameter("UserName", adVarChar, adParamInput, 400, UserName)
 oCmdUserInfo.Parameters.Append oCmdUserInfo.CreateParameter("p_decrypted_string", adVarChar, adParamOutput, 8)
 Set objRsUser = oCmdUserInfo.Execute
 Test = oCmdUserInfo.Parameters("p_decrypted_string").value
 
If objRsUser.EOF Then
  Session("Authenticated") = 0
%>
I run this an keep getting a error at this line
Code:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Oracle][ODBC][Ora]ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'DECRYPT' ORA-06550: line 1, column 7: PL/SQL: Statement ignored 
/test/login.asp, line 111
 
 
Set objRsUser = oCmdUserInfo.Execute
I also have an include file adovbs.inc.
I or nobody can figure this out. Any ideas experts. Thanks.
Did you resolved this problem ? I have the same problems now. I don't know what to do ?
rvalera is offline
Reply With Quote
View Public Profile
 
Old 08-01-2007, 06:46 PM Re: Help with ASP and oracle Encryption Procedure
Junior Talker

Posts: 2
Name: Ruben Valera
Trades: 0
Did you resolve this problem? I have the same problem now I don't know what to do.
rvalera is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Help with ASP and oracle Encryption Procedure
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11662 seconds with 13 queries