Re: Character to number conversion error:

From: <>
Date: Tue, 10 Aug 1999 11:52:35 GMT
Message-ID: <7op3q1$5op$>

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 <>,   Zahid Khan <> 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
> 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?
> 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?
> Zahid Khan

Sent via
Share what you know. Learn what you don't. Received on Tue Aug 10 1999 - 13:52:35 CEST

Original text of this message