Welcome to dbFreaks.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

VB MS Access - How to delete all RS in tbl

 
   Database Help (Home) -> Visual Basic RSS
Next:  Datasource through VB code  
Author Message
mt

External


Since: May 31, 2004
Posts: 1



(Msg. 1) Posted: Mon May 31, 2004 10:01 pm
Post subject: VB MS Access - How to delete all RS in tbl
Archived from groups: microsoft>public>vb>database (more info?)

What command syntax to use to delete all the data in a table ?
Not delete the table itself.

The only way I know of is to loop thru the entire table RS count
and do RS.DELETE in each of the loop.

What is a better way to do that ?

Thanks in advance.

 >> Stay informed about: VB MS Access - How to delete all RS in tbl 
Back to top
Login to vote
Jezebel2

External


Since: Apr 20, 2004
Posts: 21



(Msg. 2) Posted: Tue Jun 01, 2004 12:31 pm
Post subject: Re: VB MS Access - How to delete all RS in tbl [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Use an SQL statement: DELETE * FROM MyTable;


"mt" <tsaim RemoveThis @mft.com> wrote in message
news:%23ZmdoL2REHA.1312@TK2MSFTNGP12.phx.gbl...
 > What command syntax to use to delete all the data in a table ?
 > Not delete the table itself.
 >
 > The only way I know of is to loop thru the entire table RS count
 > and do RS.DELETE in each of the loop.
 >
 > What is a better way to do that ?
 >
 > Thanks in advance.
 >
 ><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: VB MS Access - How to delete all RS in tbl 
Back to top
Login to vote
Chris Barber

External


Since: Jun 02, 2004
Posts: 90



(Msg. 3) Posted: Tue Jun 01, 2004 12:31 pm
Post subject: Re: VB MS Access - How to delete all RS in tbl [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"DELETE FROM TABLE"

No fields / '*' required.

Chris.


"Jezebel" <dwarves.DeleteThis@heaven.com.kr> wrote in message news:OadAbd2REHA.2976@TK2MSFTNGP10.phx.gbl...
Use an SQL statement: DELETE * FROM MyTable;


"mt" <tsaim.DeleteThis@mft.com> wrote in message
news:%23ZmdoL2REHA.1312@TK2MSFTNGP12.phx.gbl...
 > What command syntax to use to delete all the data in a table ?
 > Not delete the table itself.
 >
 > The only way I know of is to loop thru the entire table RS count
 > and do RS.DELETE in each of the loop.
 >
 > What is a better way to do that ?
 >
 > Thanks in advance.
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: VB MS Access - How to delete all RS in tbl 
Back to top
Login to vote
Ronald W. Roberts

External


Since: Feb 07, 2004
Posts: 10



(Msg. 4) Posted: Tue Jun 01, 2004 7:46 pm
Post subject: Re: VB MS Access - How to delete all RS in tbl [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

mt wrote:

 >What command syntax to use to delete all the data in a table ?
 >Not delete the table itself.
 >
 >The only way I know of is to loop thru the entire table RS count
 >and do RS.DELETE in each of the loop.
 >
 >What is a better way to do that ?
 >
 >Thanks in advance.
 >
 >
 >
 >


Dim dbs As Database

Set dbs = CurrentDb
dbs.Execute "DELETE * FROM SomeTable;"

Ron

--
Ronald W. Roberts
Roberts Communication
rwr_at_robcom_dot_com.RemoveThis@robcom.com
To reply remove "_at_robcom_dot_com"<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: VB MS Access - How to delete all RS in tbl 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Cannot Delete Pocket Access File - I'm creating a Pocket Access file (via an EVB application) on a mobile device running PPC 2002. When the user logs off the EVB application, I want to delete the Access file (stored in the /Temp folder). However, I am unable to do this because the..

Getting at access feilds indirectly - Hi, I'm trying to build a generic routine that will load a combobox from a table: Public Sub Load_Class(InCntl As ComboBox, s_Table As String, s_Item_Name As String, s_Index_Name As String) Dim ss_Temp As Recordset On Error GoTo 0 If Not..

Access 2002 Automation problem with OpenReport - My VB 6 application needs to print a report in an Access 2002 database. This was working fine when I used Access 97 but now the application quits without any errors on the DoCmd.OpenReport line. I have my VB application references set to access 10.0. ....

sql query returns in wrong format - Hi, Hope someone can help me with this. I have MS SQL 2000 database where i have Table "PriceList" and there a column "Pricemk" wich is data type "money". All data in this column is in form "10001,35". So why when...

arrays - is there a way to concatenate the contents of an array (looping through the array) and storing each item in a comma delimited string? Thanks!
   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 ]