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
Mahendra Kumar
NA
164
5.4k
How to make connection String from MS Access database
Jan 4 2018 12:00 AM
How to make connection String from MS Access database in asp.net
I am using following code
protected void btnAccessDataBase_Click(object sender, EventArgs e)
{
OleDbConnection conn = new OleDbConnection();
conn.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=D:\Mahendra\Student.mdb; User id=admin;Password=password;";
string sqlqry = "Insert into tblStudent(FirstName,LastName)Values('" + txtFirstName.Text + "','" + txtLastName.Text + "')";
OleDbCommand cmd = new OleDbCommand(sqlqry, conn);
conn.Open();
int a = cmd.ExecuteNonQuery();
conn.Close();
if (a > 0)
{
}
}
What is going on here?
Thanks,
--Mahendra
Reply
Answers (
5
)
how to search data from to db using start and and date in as
Dropdownlist in childgrid is not getting fired its event