I have this code
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.OleDb;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Access_Database
{
public partial class Form1 : Form
{
private OleDbConnection myconnection;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string strconn = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\dell\Desktop\Database\Student_Access.mdb;Persist Security Info=False";
myconnection = new OleDbConnection(strconn);
myconnection.Open();
string query = "insert into tblStudent values('" + textBox1.Text + "','"+textBox2.Text+"','"+textBox3.Text+"');";
OleDbCommand mycommand = new OleDbCommand(query, myconnection);
mycommand.ExecuteNonQuery();
MessageBox.Show("successfull");
}
}
}
but the error is "could not find file"
what should i do?
reagards..