Operation must use an updateable query. (Urgent)

Joined
Jun 1, 2009
Messages
1
Reaction score
0
public void storecounter(int counter)
{
System.AppDomain.CurrentDomain.BaseDirectory.ToString();
string p;
string relativepath = @"~/counter.mdb";
string vount = counter.ToString();
AccessDataSource da = new AccessDataSource();
da.AppRelativeTemplateSourceDirectory = "~/counter.mdb";
p = System.IO.Path.GetFileName("~/counter.mdb");
da.DataFile = "~//counter.mdb";
OleDbConnection con = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; data source=" + Server.MapPath("~/App_Code/counter.mdb") + "");
con.Open();
OleDbCommand cmd = new OleDbCommand("INSERT INTO [counter] values(@counter)", con);
cmd.Parameters.AddWithValue("@counter", counter);
cmd.ExecuteNonQuery(); <---------- HEre is give on error
cmd.Dispose();
con.Close();
}

I am Ram Kumar a beginer programmer. i have host a website on net. when i filling the form for testing purpose. it gives an error operation must use an updateable query. my database in access.
Please Solve this Error Ugrently.
Please
Please
any one help me
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top