0

Hello Friends I am using Microsoft Visual Studio 2005 and ms-acess 2000 to build very simple database application
Here is my Code of Conncetion:

con = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\db1.mdb")
        sql = "INSERT INTO emp values(@op1,@op2)"
        cmd = New OleDbCommand(sql, con)
        cmd.Parameters.AddWithValue("@op1", TextBox1.Text)
        cmd.Parameters.AddWithValue("@op2", TextBox2.Text)
        con.Open()
        cmd.ExecuteNonQuery()
        con.Close()

This is simple code to insert data from textbox to table row
But Whenever i run it did not give me error but when i check on database the record is not there.
What should i do?????
Please Guys Help Me Out.
thanks in advance..

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by ameyanatu
0

Select the .mdb file in solution explorer and set Copy To Output Directory=Copy if Newer file property from the properties window.

0

Select the .mdb file in solution explorer and set Copy To Output Directory=Copy if Newer file property from the properties window.

Thank Tou!!!!!!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.