Operation must use an updateable query. (Urgent)

Discussion in '.NET' started by willysiddh, Jun 1, 2009.

  1. willysiddh

    willysiddh

    Joined:
    Jun 1, 2009
    Messages:
    1
    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
    willysiddh, Jun 1, 2009
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. abdul haleem
    Replies:
    3
    Views:
    420
    Wim Hollebrandse
    Oct 19, 2003
  2. =?Utf-8?B?S2Vu?=

    Operation must use an updateable query Error!!!

    =?Utf-8?B?S2Vu?=, Feb 13, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    1,284
    Hans Kesting
    Feb 13, 2004
  3. =?Utf-8?B?S2Vu?=

    Operation must use an updateable query Error!!!

    =?Utf-8?B?S2Vu?=, Feb 13, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    330
    =?Utf-8?B?S2Vu?=
    Feb 13, 2004
  4. Alphonse Giambrone

    Re: Operation must use an updateable query.

    Alphonse Giambrone, Apr 28, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    3,017
    Pravin A. Sable
    Apr 29, 2004
  5. Kevin Spencer

    Re: Operation must use an updateable query.

    Kevin Spencer, Apr 28, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    615
    Alphonse Giambrone
    Apr 29, 2004
Loading...

Share This Page