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
    Likes Received:
    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
     
    willysiddh, Jun 1, 2009
    #1
    1. Advertisements

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:
    562
    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,534
    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:
    412
    =?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,191
    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:
    758
    Alphonse Giambrone
    Apr 29, 2004
  6. Mark Sandfox
    Replies:
    1
    Views:
    12,018
    Ken Cox [Microsoft MVP]
    May 3, 2004
  7. =?Utf-8?B?ZGhpdmE=?=

    Operation must use an updateable query

    =?Utf-8?B?ZGhpdmE=?=, May 6, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    1,589
    Teemu Keiski
    May 6, 2004
  8. John
    Replies:
    4
    Views:
    2,031
    Hans Kesting
    Oct 8, 2004
Loading...