473,405 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Trying to use a stored procedure

Hello,
I'm trying to access a stored procedure on our AS400 that is written
in RPG. I know that the stored procedure works (I've called it from
an RPG program on the AS400), and I know that the connection to the
AS400 is good, because this same ASP page is reading data via SQL.
However, when I try to call the stored procedure, I can't tell if
anything is actually happening. All that I know is that the end
result is not being changed, so I suspect that the procedure isn't
being called correctly.
My stored procedure is used to encrypt/decrypt data. It has 3
parameters - a 1 character flag telling it whether to encrypt or
decrypt, a 25 character field for the plaintext data, and a 50
character field for the encrypted data. The last two parameters are
used for either input or output, depending on the value of the first
flag (if the flag is "E", then the plaintext is used as input and the
program fills the encrypted data field. If the flag is "D", then vice-
versa).

Here is the code where I call my stored procedure. I'm trying to
decrypt data from the queryString and place it in some program
variables. I'm new to ASP, and can't find any good examples for my
situation, so I pieced this together from what examples I found
online. Can anyone tell me what I'm missing? Thanks in advance!

dim cmd
Set cmd = Server.CreateObject("ADODB.Command")
Set cmd.ActiveConnection = cn
cmd.CommandText = "ENCRYPTDECRYPT"
cmd.CommandType = adCmdStoredProc
cmd.Parameters.Append cmd.CreateParameter("FUNCTION", adChar, _
adParamInput, 1)
cmd.Parameters.Append cmd.CreateParameter("PLAINTEXT", adChar, _
adParamInputOutput, 25)
cmd.Parameters.Append cmd.CreateParameter("CYPHERTEXT", adChar,
_
adParamInputOutput, 50)
cmd.Parameters("FUNCTION") = "D"
cmd.Parameters("CYPHERTEXT") = Request.QueryString("user")
cmd.Execute

sUser = cmd.Parameters("PLAINTEXT")

cmd.Parameters("CYPHERTEXT") = Request.QueryString("pwd")
cmd.Execute

sPwd = cmd.Parameters("PLAINTEXT")

Feb 1 '07 #1
0 1269

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Nashat Wanly | last post by:
HOW TO: Call a Parameterized Stored Procedure by Using ADO.NET and Visual C# .NET View products that this article applies to. This article was previously published under Q310070 For a Microsoft...
1
by: Brad H McCollum | last post by:
I've looked through many suggestions and partial examples all over this newsgroup and still am not coming up with anything that does specifically what I'm wanting to accomplish. I'm writing a VB...
8
by: Thomasb | last post by:
With a background in MS SQL Server programming I'm used to temporary tables. Have just started to work with DB2 ver 7 on z/OS and stumbled into the concept of GLOBAL TEMPORARY TABLE. I have...
0
by: pareh | last post by:
Hi I get a very strange message when I'm trying to compile a stored procedure. "Error: Input string was not in a correct format." What more that is interesting is that I have compile my...
2
by: Dino L. | last post by:
How can I run stored procedure (MSSQL) ?
0
by: Amber | last post by:
Stored procedures are faster and more efficient than in-line SQL statements. In this article we will look at two SQL Server stored procedures; one using an input parameter and one not, and see how...
0
by: bobby_b_ | last post by:
Hello, I'm trying to access a stored procedure on our AS400 that is written in RPG. I know that the stored procedure works (I've called it from an RPG program on the AS400), and I know that the...
1
by: sshankar | last post by:
Hi, New to Stored procedure. Basically just installed DB2 v8.1.0.36 Was trying to build a stored procedure.. It is giving following error.. Looks like some error related to configuration...
2
by: jed | last post by:
I have created this example in sqlexpress ALTER PROCEDURE . @annualtax FLOAT AS BEGIN SELECT begin1,end1,deductedamount,pecentageextra FROM tax
2
by: E11esar | last post by:
Hello there. I am going in bit of a circle with this matter; First some background: I am trying to upload the details of a CSV file into an Oracle table. I am using a StreamReader to copy a line...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.