Which newsgroup? Is the answer just to use a loop to build a string of
prikeys then do delete from table where prikey in (STIRNG)? This will
eventually fail because the number of records selected increases the string
will become larger.
Cheers
Stu
"Veign" <NOSPAMinveign DeleteThis @veign.com> wrote in message
news:O8CBvqCGFHA.1044@TK2MSFTNGP14.phx.gbl...
> Answered in another newsgroup...
>
> --
> Chris Hanscom - Microsoft MVP (VB)
> Veign's Resource Center
> http://www.veign.com/vrc_main.asp
> --
>
> "Zeppo" <zeppo_no_spam_at_all DeleteThis @xs4all.nl> wrote in message
> news:ukph11hps1310g4e2qealmd170i6pjl1k1@4ax.com...
> > I couldn't figure this one out:
> > my app lets users select records, that are displayed in a datagrid
> > They can then choose to delete the whole current selection.
> >
> > i tried rs.delete, but that gave me an error.
> > Primary keys are in available in recordset.
> > to be precise: i get a lovely
> > "insufficient key column information for updating or refreshing"
> > error when trying to rs.delete
> >
> > Basically, i filled an ado recordset with a sql query.
> > The recordset is shown in a datagrid.
> > Of course i could delete every record one by one, but i was looking
> > for a way to easily delete all records. As said: the primary key is
> > part of the recordset.
> > Rs,delete didn't work. Is there a way to delete all records in 1 SQL
> >
> > Something like:
> >
> > DELETE * FROM mytable WHERE id IN .......
>
> >> Stay informed about: [VB6 /ADO] Delete statement: Delete all underlying records..