Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Character to number conversion error:

Re: Character to number conversion error:

From: <mgumbs_at_hotmail.com>
Date: Tue, 10 Aug 1999 11:52:35 GMT
Message-ID: <7op3q1$5op$1@nnrp1.deja.com>


The variable declarations in your procedure have to match (to a certain extent) the declarations on the table you are inserting into. If you do a desc on fpri_admin.cmpd, check to see if p_cmpd_name and p_cmpd_formula are varchars. If they are numbers, implicit conversion may take place as long as there is no risk that alpha characters can be typed in from the user. If they are varchars, make sure that what the user types in isn't longer than what the table definition says (e.g inserting 'The Cat' in a varchar2(3) ).

HTH, Mark

In article <37AF09A3.920B4BAA_at_cc.gatech.edu>,   Zahid Khan <zahid_at_cc.gatech.edu> wrote:
>
> I am using WebDB on Oracle8i to make a data entry form.
> When the user fills in the data on a webpage and hits the submit
button,
>
> a PL/SQL procedure is called and the data is supposed to be stored in
> the appropiate tables. however, I get this error message:
>
> ORA-06502: PL/SQL: numeric or value error: character to number
> conversion error
> ORA-06512: at line 1
>
> I don't know how to interpret this error message. Where is the error?
On
>
> line one of my PL/SQL code? or somewhere else?
>
> Here's my PL/SQL code:
>
> create or replace procedure data_entry ( p_cmpd_id in varchar2,
> p_cmpd_name in varchar2,
> p_cmpd_formula in varchar2,
> p_ca_number in number,
> p_purity in number,
> p_molecular_wt in number,
> p_crit_temp in number,
> p_crit_press in number,
> p_crit_vol in number,
> p_norm_bp in number,
> p_melt_pt in number,
> p_lmv in number )
>
> begin
> -- inserting data into cmpd table
> insert into fpri_admin.cmpd values
> ( p_cmpd_id, p_cmpd_name, p_cmpd_formula, p_ca_number,
> p_purity, p_molecular_wt, p_crit_temp, p_crit_press, p_crit_vol,
> p_norm_bp, p_melt_pt, p_lmv);
> end data_entry;
>
> Can someone tell me why I get this error?
>
> TIA
> Zahid Khan
>
>

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Tue Aug 10 1999 - 06:52:35 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US