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
sita k
NA
43
52.2k
How to insert multiple rows from form in to database.
Nov 28 2013 1:17 PM
Hello Everyone, I am trying to insert multiple rows in to database but not sure how to proceed. In the form I am selecting company name and then I need to enter employee records one by one. How to enter the multiple records at a time? Below is my piece of code which works fine for single record when submitting: OracleCommand cmd1 = new OracleCommand("Insert_Employee_Det", con); cmd1.CommandType = CommandType.StoredProcedure; cmd1.Parameters.Add(new OracleParameter("fname", txtfname1.Text)); cmd1.Parameters.Add(new OracleParameter("lname", txtlname1.Text)); cmd1.Parameters.Add(new OracleParameter("address", txtaddr.Text)); try { con.Open(); cmd1.ExecuteNonQuery(); } catch (Exception err) { } finally { con.Close(); } Regards.
Reply
Answers (
4
)
photo gallery dynamically from database
what is visual sudio 2010 ultimate.iso