473,671 Members | 2,466 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem With Varchar2 Parameter in ASP.NET

I am using System.Data.Ora cleClient (Oracle Provider for OLE DB 9.2.0.4.0)
in an ASP.NET 1.1 app. I am evoking a stored procedure with a number of
input parameters and two output parameters, both declared
ParametrerDirec tion.InputOutpu t. The first of these two output parameters
is an integer value. It is the status of the running of the stored
procedure. It is working fine.

The second parameter is designed to return a message from the stored
procedure like "Row has been updated" or "Row could not be found". This has
been declared as a varchar2 variable in the stored procedure and a
OracleType.VarC har in the ASP.NET.

If I do not initialize the ADO parameter for this second output parameter to
a large number of spaces, the ASP.NET app blows up when executing the
cmd.ExecuteOrac leScalar(). When I do initialize with a large number of
spaces, ASP.NET does not blow up, the stored procedure run successfully but
the value property of this parameter is still set to the large number of
spaces instead of the message being generated by the stored procedure.

Nov 19 '05 #1
2 2429
Have you tried explicitly setting the OracleParameter object to the correct
size/length? eg. oracleParameter .Size = 40;

BTW, what exactly does "blow up" mean?
--

- Paul Glavich
ASP.NET MVP
ASPInsider (www.aspinsiders.com)
"Robert E. Flaherty" <Bo**@TimeVisio n.Com> wrote in message
news:u4******** ******@TK2MSFTN GP14.phx.gbl...
I am using System.Data.Ora cleClient (Oracle Provider for OLE DB 9.2.0.4.0)
in an ASP.NET 1.1 app. I am evoking a stored procedure with a number of
input parameters and two output parameters, both declared
ParametrerDirec tion.InputOutpu t. The first of these two output parameters
is an integer value. It is the status of the running of the stored
procedure. It is working fine.

The second parameter is designed to return a message from the stored
procedure like "Row has been updated" or "Row could not be found". This has been declared as a varchar2 variable in the stored procedure and a
OracleType.VarC har in the ASP.NET.

If I do not initialize the ADO parameter for this second output parameter to a large number of spaces, the ASP.NET app blows up when executing the
cmd.ExecuteOrac leScalar(). When I do initialize with a large number of
spaces, ASP.NET does not blow up, the stored procedure run successfully but the value property of this parameter is still set to the large number of
spaces instead of the message being generated by the stored procedure.


Nov 19 '05 #2
I have tried setting the parameter.size. When I set it to 255 and set the
value to " ", I get the following error message in the ASP.NET app:

Server Error in '/NGIT_Parameters ' Application.
ORA-06502: PL/SQL: numeric or value error ORA-06512: at
"NG.SSYNC_NG_UP DATE_TMGRS", line 92 ORA-06512: at "NG.SSYNC_NG_MG T_TMGRS",
line 50 ORA-06512: at line 1

When I set the parameter to a large number of spaces, it does not blow up
but on inspection of the parameter.value after the execution, it is still
equal to those spaces.

"Paul Glavich [MVP ASP.NET]" <gl**@aspallian e.com-NOSPAM> wrote in message
news:er******** ******@TK2MSFTN GP10.phx.gbl...
Have you tried explicitly setting the OracleParameter object to the
correct
size/length? eg. oracleParameter .Size = 40;

BTW, what exactly does "blow up" mean?
--

- Paul Glavich
ASP.NET MVP
ASPInsider (www.aspinsiders.com)
"Robert E. Flaherty" <Bo**@TimeVisio n.Com> wrote in message
news:u4******** ******@TK2MSFTN GP14.phx.gbl...
I am using System.Data.Ora cleClient (Oracle Provider for OLE DB
9.2.0.4.0)
in an ASP.NET 1.1 app. I am evoking a stored procedure with a number of
input parameters and two output parameters, both declared
ParametrerDirec tion.InputOutpu t. The first of these two output
parameters
is an integer value. It is the status of the running of the stored
procedure. It is working fine.

The second parameter is designed to return a message from the stored
procedure like "Row has been updated" or "Row could not be found". This

has
been declared as a varchar2 variable in the stored procedure and a
OracleType.VarC har in the ASP.NET.

If I do not initialize the ADO parameter for this second output parameter

to
a large number of spaces, the ASP.NET app blows up when executing the
cmd.ExecuteOrac leScalar(). When I do initialize with a large number of
spaces, ASP.NET does not blow up, the stored procedure run successfully

but
the value property of this parameter is still set to the large number of
spaces instead of the message being generated by the stored procedure.



Nov 19 '05 #3

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

Similar topics

3
4679
by: Nicolas Payre | last post by:
Hi, I have the following SQL that I want to use to update a table. It doesn't work ! Does someone knows why? ** I Know it could be done easy with a CURSOR FOR LOOP, but still... Thanks for your help. update XSORA1A.XS0011T_STATISTIQUES_UNIX a
2
12818
by: Arijit Chatterjee | last post by:
Dear All, I am faceing a problem in sql output in SQLPLUS screen.I am explaining the details.. ====================================================================== SQL> desc accountmaster; ====================================================================== ====================================================================== Output of the Command ======================================================================...
0
1536
by: CJM | last post by:
Repeated for the benefit of m.p.i.asp.general, which I forgot to include in the original posting... "CJM" <cjmnews04@REMOVEMEyahoo.co.ukwrote in message news:4lo3f8F2shqtU1@individual.net...
1
1132
by: zeeshansohail | last post by:
I have two tables named as “COMPANY and BILL_DETAIL” with the following structure. BILL_DETAIL TABLE Name Type Nullable ------------- -------------- -------- BILL_ID NUMBER(7) S_HEAD_CODE VARCHAR2(12) SR_NO NUMBER(9) BILL_AMOUNT NUMBER(10) Y
0
1900
by: rohan_from_mars | last post by:
I've found that I need to compulsory specify size for any varchar2 output parameter. If i do not specify size I get foll exception: Oracle.DataAccess.Client.OracleException ORA-06502: PL/SQL: numeric or value error Is there any workaround by which I do not need to specify size of output parameter. I am asking this because of tommorrow the data size of columns changes then the code also needs to be changed to adjust the parameter size.
0
1074
by: inancigdem | last post by:
hello, I have a table which has coloumns like resim_ad and resim_id I want to select resim_ad according to resim_id I wrote a procedure for it create or replace procedure pro (r_id in varchar2,r_ad out varchar2) is begin select resim_adi into r_ad
1
4178
by: zrtv | last post by:
hi All, Iam new in oracle stored procedure, i have one stored procedure and it has to be accessed from vb6. my stored procedure as follows -- employee salary will be entered by the user and itshould show employees less than the the given salary CREATE OR REPLACE PROCEDURE employee1(empcode OUT VARCHAR2, empname OUT VARCHAR2, POSITION OUT VARCHAR2, sal IN NUMBER) IS CURSOR c1 IS SELECT empid, empname, grade FROM empmst WHERE...
1
1236
by: san1014 | last post by:
Hi I have a problem with procedure. i have a table patient_list SQL> desc patient_list; Name Null? Type ----------------------------------------- -------- ------------------------ PATIENT_ID NOT NULL VARCHAR2(10) PATIENT_NAME VARCHAR2(25) AGE VARCHAR2(3)
14
2634
by: ESHA1 | last post by:
CREATE OR REPLACE procedure TEST_EMAIL(errbuf OUT VARCHAR2, retcode OUT VARCHAR2, p_from_date date, p_to_date date, P_CANDIDATE_NAME VARCHAR2) as x_manager_name1 assignment.manager_name%type; x_EMAIL_ADDRESS candidate.EMAIL_ADDRESS%type; x_candidate_name1 assignment.candidate_name%TYPE; x_customer_name1 assignment.customer_name%TYPE; x_manager_name ...
0
8483
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8927
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
8825
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
7445
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...
1
6237
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5703
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
4227
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...
0
4416
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2062
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.