472,952 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Problem With Varchar2 Parameter in ASP.NET

I am using System.Data.OracleClient (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
ParametrerDirection.InputOutput. 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.VarChar 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.ExecuteOracleScalar(). 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 2400
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**@TimeVision.Com> wrote in message
news:u4**************@TK2MSFTNGP14.phx.gbl...
I am using System.Data.OracleClient (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
ParametrerDirection.InputOutput. 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.VarChar 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.ExecuteOracleScalar(). 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_UPDATE_TMGRS", line 92 ORA-06512: at "NG.SSYNC_NG_MGT_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**@aspalliane.com-NOSPAM> wrote in message
news:er**************@TK2MSFTNGP10.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**@TimeVision.Com> wrote in message
news:u4**************@TK2MSFTNGP14.phx.gbl...
I am using System.Data.OracleClient (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
ParametrerDirection.InputOutput. 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.VarChar 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.ExecuteOracleScalar(). 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
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...
2
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;...
0
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
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 ------------- -------------- -------- ...
0
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:...
0
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...
1
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...
1
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 -----------------------------------------...
14
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 ...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.