Hi!

Substitute your code from this one:

http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbcommandbuilder.aspx


Cheers!


Benj





On Dec 1, 5:16 pm, "Montezuma's Daughter" <[email protected]>
wrote:
> Hi Benj
> usualy I agree
> can you help me anyway?
>          public DataSet UpdateResourcesToTasks(DataSet ds)
>             {
>                 using (cn)
>                 {
>                     OleDbDataAdapter adapter = new OleDbDataAdapter();
>                     string queryString = "SELECT [Id],[Name] FROM
> [students]";
>                     cn.ConnectionString =
> "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + _conStrName + ";User
> Id=admin;Password=;";
>                     OleDbConnection connection = new OleDbConnection
> (cn.ConnectionString);
>                     adapter.SelectCommand = new OleDbCommand
> (queryString, connection);
>                     adapter.SelectCommand.CommandText = queryString;
>
>                     OleDbCommandBuilder builder = new
> OleDbCommandBuilder(adapter);
>                      adapter.Update(ds.Tables["students"]);
>
>                     return ds;}
> }
>
> the ds I get is after the changes
>
> On 1 דצמבר, 08:43, Benj Nunez <[email protected]> wrote:
>
> > Hi!
>
> > "query builder"? If I'm not mistaken, you're referring to the Command
> > Builder.
>
> > See:http://www.c-sharpcorner.com/UploadFile/puranindia/CommandObjectComma...
>
> > You need to pass the correct sql delete command/statement to the
> > DataAdapter.DeleteCommand.
>
> > Oftentimes, the best way is to code it by hand rather than relying on
> > what the wizard does for you.
>
> > On Dec 1, 12:29 am, "Montezuma's Daughter" <[email protected]>
> > wrote:
>
> > > Hi all
> > > I have a small project in c# and ms-access
> > >  I use query builder to manage my tables in ms-access.
> > > the problem is, select qeury works great, update query works great,
> > > delete doesn't work , and there is no error msg!!!!!!1 please help!!-הסתר 
> > > טקסט מצוטט-
>
> > -הראה טקסט מצוטט-

Reply via email to