Welcome to dbFreaks.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

[VB6] Have a selection in a recordset. How do i easily del..

 
   Database Help (Home) -> Visual Basic RSS
Related Topics:
How to do a SELECT on a RecordSet - How would I do a SELECT on a I have created the recordset from an Oracle database using a Select statement with a Group By. Now I need to Select from that result and further Group By and Sum. The logic of the don't allow for..

sql query returns in wrong format - Hi, Hope someone can help me with this. I have MS SQL 2000 database where i have Table and there a column wich is data type All data in this column is in form So why when i run .asp page with simple query to..

arrays - is there a way to the contents of an array (looping through the array) and storing each item in a comma delimited string? Thanks!

DataReport PageBreak - Hi everyone, I would like to know how to force pagebreak in a for example after 5 records printed. Thank you all

Possible Use of a Cursor - I have a complex query that I hope I can explain it well enough for everyone to I have a table that contains for work Contained in the table are these are groupings of machining
Next:  Visual Basic: Unrecognised database format  
Author Message
Zeppo

External


Since: Feb 19, 2005
Posts: 2



(Msg. 1) Posted: Sun Feb 20, 2005 12:15 am
Post subject: [VB6] Have a selection in a recordset. How do i easily delet
Archived from groups: comp>lang>basic>visual>database (more info?)

As said: my app lets users select records.
They can choose to delete the whole current selection.

i tried rs.delete, but that gave me an error.

Primary keys are in available in recordset.

Any thoughts?

 >> Stay informed about: [VB6] Have a selection in a recordset. How do i easily del.. 
Back to top
Login to vote
Zeppo

External


Since: Feb 19, 2005
Posts: 2



(Msg. 2) Posted: Sun Feb 20, 2005 12:15 am
Post subject: Re: [VB6] Have a selection in a recordset. How do i easily d [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sat, 19 Feb 2005 23:42:21 +0100, Zeppo
<Zeppo_no_spam_at_all.TakeThisOut@xs4all.nl> wrote:

 >As said: my app lets users select records.
 >They can choose to delete the whole current selection.
 >
 >i tried rs.delete, but that gave me an error.
 >
 >Primary keys are in available in recordset.
 >
 >Any thoughts?

to be precise: i get a lovely

"insufficient key column information for updating or refreshing"

error when trying to rs.delete<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: [VB6] Have a selection in a recordset. How do i easily del.. 
Back to top
Login to vote
Veign

External


Since: Apr 22, 2004
Posts: 13



(Msg. 3) Posted: Sun Feb 20, 2005 12:15 am
Post subject: Re: [VB6] Have a selection in a recordset. How do i easily d [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Post some code and SQL statements

--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
<a style='text-decoration: underline;' href="http://www.veign.com/vrc_main.asp" target="_blank">http://www.veign.com/vrc_main.asp</a>
--

"Zeppo" <Zeppo_no_spam_at_all.DeleteThis@xs4all.nl> wrote in message
news:tagf11hhf0nmhmdnhmnfl8oi7t807e56bh@4ax.com...
 > On Sat, 19 Feb 2005 23:42:21 +0100, Zeppo
 > <Zeppo_no_spam_at_all.DeleteThis@xs4all.nl> wrote:
 >
  > >As said: my app lets users select records.
  > >They can choose to delete the whole current selection.
  > >
  > >i tried rs.delete, but that gave me an error.
  > >
  > >Primary keys are in available in recordset.
  > >
  > >Any thoughts?
 >
 > to be precise: i get a lovely
 >
 > "insufficient key column information for updating or refreshing"
 >
 > error when trying to rs.delete
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: [VB6] Have a selection in a recordset. How do i easily del.. 
Back to top
Login to vote
mickey

External


Since: Feb 15, 2005
Posts: 6



(Msg. 4) Posted: Sun Feb 20, 2005 7:40 am
Post subject: Re: [VB6] Have a selection in a recordset. How do i easily d [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Back to top
Login to vote
Zeppo1

External


Since: May 03, 2004
Posts: 4



(Msg. 5) Posted: Sun Feb 20, 2005 3:40 pm
Post subject: Re: [VB6] Have a selection in a recordset. How do i easily d [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sat, 19 Feb 2005 23:23:00 GMT, "Veign" <me.TakeThisOut@home.com> wrote:

 >Post some code and SQL statements

Well, there is not much to show.
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 .......<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: [VB6] Have a selection in a recordset. How do i easily del.. 
Back to top
Login to vote
Randy Day

External


Since: Oct 06, 2003
Posts: 50



(Msg. 6) Posted: Sun Feb 20, 2005 8:49 pm
Post subject: Re: [VB6] Have a selection in a recordset. How do i easily d [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Zeppo wrote:

 > On Sat, 19 Feb 2005 23:23:00 GMT, "Veign" <me.RemoveThis@home.com> wrote:
 >
 >
  >>Post some code and SQL statements
 >
 >
 > Well, there is not much to show.
 > 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 .......

Use an ADODB.Command object.

<a style='text-decoration: underline;' href="http://juicystudio.com/tutorial/vb/database.asp" target="_blank">http://juicystudio.com/tutorial/vb/database.asp</a>

Look for the section entitled 'The SQL Delete Statement'<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: [VB6] Have a selection in a recordset. How do i easily del.. 
Back to top
Login to vote
Display posts from previous:   
   Database Help (Home) -> Visual Basic All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]