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
ROHIT SINHA
1.4k
360
3.9k
Insert data in database using user-defined method
May 17 2018 2:33 PM
Hi all
I want to create a user-defined method which helps to insert any type of data into the database For example
public DataTable BindGrid(string proc_nme)
{
con.Open();
DataTable dt = new DataTable();
SqlDataReader dr;
cmd = new SqlCommand(proc_nme, con);
dr = cmd.ExecuteReader();
dt.Load(dr);
return dt;
}
This is the method for getting data from the database we have to only pass the procedure name. As the same, I want to create a method for insertion.
Thanks in advance.
Reply
Answers (
1
)
Image Upload in Byte
Push notification using code first approach in asp.net mvc