1
Reply

how to insert data into database

aylin_sk

aylin_sk

Dec 9 2004 8:35 AM
2.9k
When I want to insert records into database, it doesnt insert..and i found this error..Please help me finding this error in my code... Message: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'ADD_PATIENT' ORA-06550: line 1, column 7: PL/SQL: Statement ignored Source: System.Data.OracleClient .aspx.cs script: private void Button1_Click(object sender, System.EventArgs e) { coreLpms.patients myPatient = new coreLpms.patients(); string patientPotential = "H"; if (cbPatientPotential.Checked) patientPotential = "E"; else patientPotential = "H"; if (myPatient.addPatient(textPatientName.Text, textPatientLastName.Text, comboPatientSex.SelectedItem.Value, textPatientTreatStartDate.Text, textPatientBirthdate.Text, textPatientParent.Text, textPatientPhone.Text, textPatientAddress1.Text, textPatientAddress2.Text, comboPatientCountyId.SelectedItem.Value, comboPatientCityId.SelectedItem.Value, textPatientZipCode.Text, comboPatientGroup.SelectedItem.Value, textPatientExplanation.Text, textPatientWeek.Text, patientPotential)) { myError.Visible = false; } else { myError.Visible = true; ((Label)myError.FindControl("labelError")).Text = myPatient.myError.getLastError(); } } } ----- This is my stored procedure: CREATE OR REPLACE PACKAGE BODY PATIENTS_PKG IS procedure GET_PATIENT (resultset out globals.resultset, p_patient_number in number) is begin open resultset for select * from LPMS.PATIENTS where PATIENT_NUMBER = p_patient_number; end; procedure ADD_PATIENT (p_patient_name in varchar2, p_patient_last_name in varchar2, p_patient_sex in varchar2, p_patient_treat_start_date in varchar2, p_patient_birthdate in varchar2, p_patient_parent in varchar2, p_patient_phone in varchar2, p_patient_address1 in varchar2, p_patient_address2 in varchar2, p_patient_county_id in number, p_patient_city_id in number, p_patient_zipcode in varchar2, p_patient_group in varchar2, p_patient_explanation in varchar2, p_patient_period in varchar2, p_patient_week in number, p_patient_potential in varchar2, p_patient_record_status in varchar2) is begin insert into LPMS.PATIENTS values(PATIENT_ID_SEQ.nextval, p_patient_name, p_patient_last_name, p_patient_sex, to_date(p_patient_treat_start_date, 'dd-mm-yyyy'), to_date(p_patient_birthdate, 'dd-mm-yyyy'), p_patient_parent, p_patient_phone, p_patient_address1, p_patient_address2, p_patient_county_id, p_patient_city_id, p_patient_zipcode, p_patient_period, p_patient_group, p_patient_explanation, p_patient_week, p_patient_potential, p_patient_record_status); end; END; /

Answers (1)