473,749 Members | 2,411 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.CreateOb ject("ADODB.Com mand")
Set cmd.ActiveConne ction = cn
cmd.CommandText = "ENCRYPTDECRYPT "
cmd.CommandType = adCmdStoredProc
cmd.Parameters. Append cmd.CreateParam eter("FUNCTION" , adChar, _
adParamInput, 1)
cmd.Parameters. Append cmd.CreateParam eter("PLAINTEXT ", adChar, _
adParamInputOut put, 25)
cmd.Parameters. Append cmd.CreateParam eter("CYPHERTEX T", adChar,
_
adParamInputOut put, 50)
cmd.Parameters( "FUNCTION") = "D"
cmd.Parameters( "CYPHERTEXT ") = Request.QuerySt ring("user")
cmd.Execute

sUser = cmd.Parameters( "PLAINTEXT" )

cmd.Parameters( "CYPHERTEXT ") = Request.QuerySt ring("pwd")
cmd.Execute

sPwd = cmd.Parameters( "PLAINTEXT" )

Feb 1 '07 #1
0 1430

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

Similar topics

0
6703
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 Visual Basic .NET version of this article, see 308049. For a Microsoft Visual C++ .NET version of this article, see 310071. For a Microsoft Visual J# .NET version of this article, see 320627. This article refers to the following Microsoft .NET...
1
1983
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 6.0 application which uses SQL Server as the back-end. Here's an example of what I'm wanting to do... A user accessing the VB GUI attempts to open a certain form. Code
8
7944
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 created a temporary database with a tables space. Verified that DECLARE GLOBAL TEMPORARY TABLE TEMP (A INTEGER); INSERT INTO SESSION.TEMP VALUES(10); SELECT A FROM SESSION.TEMP; works from a query tool.
0
1328
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 stored procedure against my test enviroment and it works fine. So, this is how I do
2
5458
by: Dino L. | last post by:
How can I run stored procedure (MSSQL) ?
0
1284
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 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...
1
2444
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 files... Can you help I tried to have a look at all the files .. however unable to solve it .. can anyone let me know what i'm missing.. This is what i'm getting db2admin.PROCEDURE1 - Build started.
2
4105
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
3014
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 at a time into an array, using a string columns = line.Split(separators.ToCharArray()); command. Here is a definition of the table I am loading into:
0
8832
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9566
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9388
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9254
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8256
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4608
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.