Error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Girish Pal Singh

    #1

    Error

    string strconnection=" Provider=Micros oft.Jet.OleDb.4 .0;";
    strconnection+= @"Data Source=C:\Inetp ub\wwwroot\test pro\ptest.mdb";
    OleDbConnection con=new OleDbConnection (strconnection) ;
    con.Open();
    OleDbCommand cmd=new OleDbCommand("i nsert into candidate (cname,
    uid) values ('"+this.name.T ext+"', '"+this.uid.Tex t+"')",con);
    cmd.ExecuteNonQ uery();
    Response.Write( cmd.CommandText );

    The above code throws exception saying that
    System.Data.Ole Db.OleDbExcepti on: Operation must use an updateable
    query.

    Why?
  • Anwar

    #2
    Error

    Hi,
    Please check with your nerwork/server administrator that
    you have enough privilages to update/insert data to your
    access database.

    Anwar

    [color=blue]
    >-----Original Message-----
    >string strconnection=" Provider=Micros oft.Jet.OleDb.4 .0;";
    > strconnection+= @"Data[/color]
    Source=C:\Inetp ub\wwwroot\test pro\ptest.mdb";[color=blue]
    > OleDbConnection con=new[/color]
    OleDbConnection (strconnection) ;[color=blue]
    > con.Open();
    > OleDbCommand cmd=new OleDbCommand[/color]
    ("insert into candidate (cname,[color=blue]
    >uid) values[/color]
    ('"+this.name.T ext+"', '"+this.uid.Tex t+"')",con);[color=blue]
    > cmd.ExecuteNonQ uery();
    > Response.Write( cmd.CommandText );
    >
    >The above code throws exception saying that
    > System.Data.Ole Db.OleDbExcepti on: Operation must use an[/color]
    updateable[color=blue]
    >query.
    >
    >Why?
    >.
    >[/color]

    Comment

    Working...