Actually my intent was just to toggle the backup bit state back and forth.
It's going to be a user controlled option.

"Laurie Davis" <[EMAIL PROTECTED]> wrote in message
news:75417@palm-dev-forum...
>
> I don't think that you want that either. It will toggle the backup bit,
but not necessarily force it to off,
>
> Try     iAttrib &= ! dmHdrAttrBackup;
>
>
>
>
> "Mark Biek" <[EMAIL PROTECTED]> wrote in message
news:75411@palm-dev-forum...
> >
> >     Never mind.  I, of course, realized my mistake 30 seconds after
posting.
> > I was using & instead of ^.  Doh!
> >
> > "Mark Biek" <[EMAIL PROTECTED]> wrote in message
> > news:75410@palm-dev-forum...
> > >
> > > I have the following code setting and unsetting the backup bit of a
> > > database:
> > >
> > >  Err err;
> > >  UInt iAttrib;
> > >
> > >  err = DmDatabaseInfo( 0, idDatabase, NULL, &iAttrib, NULL, NULL,
NULL,
> > > NULL,
> > >      NULL, NULL, NULL, NULL, NULL );
> > >  if( err )
> > >  {
> > >   ErrDisplay( "DmDatabaseInfo FAIL" );
> > >   return;
> > >  }
> > >
> > >  if( bState )
> > >   iAttrib |= dmHdrAttrBackup;
> > >  else
> > >   iAttrib &= dmHdrAttrBackup;
> > >
> > >  err = DmSetDatabaseInfo( 0, idDatabase, NULL, &iAttrib, NULL, NULL,
NULL,
> > > NULL,
> > >      NULL, NULL, NULL, NULL, NULL );
> > >  if( err )
> > >  {
> > >   ErrDisplay( "DmSetDatabaseInfo FAIL" );
> > >   return;
> > >  }
> > >
> > > Turning the backup bit on works fine but turning that backup bit off
> > doesn't
> > > seem to work.  I imagine that I'm just being dumb but it's not coming
to
> > me.
> > >
> > > Thanks,
> > > Mark
> > >
> > >
> > >
> > >
> >
> >
> >
> >
>
>
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to