TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
aylin_sk
NA
87
0
null values
Dec 10 2004 2:11 AM
Hi, I can insert the records to database but p_patient_recordstatus is a checkbox and p_patient_period is a textbox..I want them to be inserted as null value...but Oracle doesnt accept null values while im inserting....so I get an error about null values.....How can i insert them as null values?? myCommand.Parameters.Add("p_patient_name", OracleType.VarChar, 20).Value = patientName; myCommand.Parameters.Add("p_patient_last_name", OracleType.VarChar, 20).Value = patientLastName; myCommand.Parameters.Add("p_patient_sex", OracleType.VarChar, 1).Value = patientSex; myCommand.Parameters.Add("p_patient_treat_start_date", OracleType.VarChar, 10).Value = patientTreatStartDate; myCommand.Parameters.Add("p_patient_birthdate", OracleType.VarChar, 10).Value = patientBirthdate; myCommand.Parameters.Add("p_patient_parent", OracleType.VarChar, 50).Value = patientParent; myCommand.Parameters.Add("p_patient_phone", OracleType.VarChar, 40).Value = patientPhone; myCommand.Parameters.Add("p_patient_address1", OracleType.VarChar, 50).Value = patientAddress1; myCommand.Parameters.Add("p_patient_address2", OracleType.VarChar, 50).Value = patientAddress2; if (patientCountyId.Equals("")) myCommand.Parameters.Add("p_patient_county_id", OracleType.Number).Value = DBNull.Value; else myCommand.Parameters.Add("p_patient_county_id", OracleType.Number).Value = Int32.Parse(patientCountyId); if (patientCityId.Equals("")) myCommand.Parameters.Add("p_patient_city_id", OracleType.Number).Value = DBNull.Value; else myCommand.Parameters.Add("p_patient_city_id", OracleType.Number).Value = Int32.Parse(patientCityId); myCommand.Parameters.Add("p_patient_zipcode", OracleType.VarChar, 5).Value = patientZipCode; myCommand.Parameters.Add("p_patient_group", OracleType.VarChar, 1).Value = patientGroup; myCommand.Parameters.Add("p_patient_explanation", OracleType.VarChar, 75).Value = patientExplanation; myCommand.Parameters.Add("p_patient_period", OracleType.VarChar, 1).Value = "patientPeriod"; if (patientWeek.Equals("")) myCommand.Parameters.Add("p_patient_week", OracleType.Number).Value = DBNull.Value; else myCommand.Parameters.Add("p_patient_week", OracleType.Number).Value = Int32.Parse(patientWeek); myCommand.Parameters.Add("p_patient_potential", OracleType.VarChar, 1).Value = patientPotential; myCommand.Parameters.Add("p_patient_record_status", OracleType.VarChar, 1).Value = "patientRecordStatus";
Reply
Answers (
3
)
How to refresh web page on going back to web page
Handling Current Page Index in DataGrid