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
Jia En
NA
30
0
how to connectin to MS Access
Jan 28 2006 5:12 AM
Hello.. How do I connect to MS Access? And I put the mdb in debug folder... I try this: try { string connString = @"Provider=Microsoft.Jet.OLEDB.4.0 ;Data Source=H:\MP\Jia En\TCP\client_Timer\bin\Debug\cgaa.mdb"; OleDbConnection conn = new OleDbConnection(connString); conn.Open(); string query = "INSERT INTO tblLogin (userName, machName, loginDT) VALUES('"+fm.userName+"','"+ fm.machName+ "', '" +fm.startTime+"')"; OleDbCommand cmd = new OleDbCommand(query, conn); cmd.ExecuteNonQuery(); MessageBox.Show("Successfully Inserted","Info",MessageBoxButtons.OK,MessageBoxIcon.Information); conn.Close(); } catch(System.Data.OleDb.OleDbException ex) { MessageBox.Show("Insertion Error, Try Again","Info",MessageBoxButtons.OK,MessageBoxIcon.Error); }
Reply
Answers (
0
)
Downloading a File
C# batch file puzzlement