473,738 Members | 2,009 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to make a code that can "delete all" records in a table in MS ACCESS DATABASE 03?

26 New Member
any code that can delete all records in just one click

if you have a dataenvironment code it more good.. cause im working in this kind of code.

like this:

single delete code (not all in the records) dataenvironment 1.command1.dele te

thats all i can do... i want to know how to create a code that can delete all records code in just a single click... of a command button..

all answers/ replies is much appreciated..

thanks in advance and more power... and happy new year.... GOD bless...
Dec 31 '09 #1
1 2276
vb5prgrmr
305 Recognized Expert Contributor
Expand|Select|Wrap|Line Numbers
  1. strSQL = "DELETE * FROM tablename"
  2. Cmd.Execute strSQL
  3.  
i.e. that is using ADO command object...



Good Luck
Dec 31 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1486
by: Jeffro | last post by:
Hi, I am trying to create a form that would have only two buttons on it. When the user clicks on one of the buttons it will issue a prompt such as Do you wish to delete all records from the Classes Table? YES NO Upon clicking on yes, then all the records in the classes table would be deleted.
16
20523
by: John Baker | last post by:
Hi: I know this is a strange question, but I have inherited a system where files are copied and records re auto numbered (as an index field) )frequently, and I am wondering how high the number can go without the system crashing. An ancillary question is how one resets an auto number so that the sequence starts again at 1. In the case of this file, the auto number field serves no useful purpose except as an
1
2524
by: Cedric Robinson via .NET 247 | last post by:
(Type your message here) -------------------------------- From: Cedric Robinson Hi, I am simply trying to insert records into an access database using asp.net. I can edit and update tables all day long. But when I go to insert I get this error. No value given for one or more required parameters. Exception Details: System.Data.OleDb.OleDbException: No value given for one or more required parameters. Source Error:
4
1547
by: papaja | last post by:
Hi, I posted this on asp.net forums already, but nobody answered it. Here is direct link: http://forums.asp.net/1124640/ShowPost.aspx. Here is the question: I'm using this code in delete command of datagrid: **************** Dataset1.DSataTable1.Rows(e.Item.ItemIndex).Delete() adp.Update(DataSet1)
2
1693
by: Mr-E | last post by:
Hi all, I've been trying for a few weeks now to make a program in Visual Studio 2005 that has a combobox to select all the tables in a database. This is a part I already have. When you have selected a table the program should make a editbox for all the columns in the table with a fitting label in front of the edits. It should also have some sort of navigation to go through the records, and like the title says, their should be a...
1
8768
by: vadarv | last post by:
Hia! I'm a total amateur to VBS but need help on a VBS script. This is used in a HMI system from Siemens called WinCC, used for process viewing and control. What I need to is to write to a table in Access, then read these values and then delete records (rows) in Access. By using help functions in WinCC I have this set up: I created an Access database with the WINCC_DATA table and columns (ID, TagValue) with the ID as the Auto Value. ...
3
2932
by: Jimmy | last post by:
I use a combo box to filter the results of a form. Sql for combo box is... SELECT StatusPriority, Status FROM tblStatus UNION Select = 0 as AllChoice, "Show All" as Bogus From tblStatus ORDER BY StatusPriority; AfterUpdate code from combo box is... If Me! = 0 Then DoCmd.ShowAllRecords Else
3
7336
by: ireallyneedtoknow2007 | last post by:
hello i am using c# in visual studio 2005 and need to insert a large number of records contained in a dataset into an access database. the following is too slow. how can i update my DataAdapter with all the rows(150000) at one time? thanks foreach (DataRow row in ds.Tables.Rows) { DataRow dr = ds1.Tables.NewRow(); dr = ds1.Tables.NewRow(); dr = row;
41
4727
bre1603
by: bre1603 | last post by:
I have a continuous form in Access 2007 called “Leadership Contact List.” It has a checkbox control for each record (bound to a field in the underlying table) that is used to email or create mailing labels for the selected contacts. In the form header, there is a “Select All” checkbox control which (of course) selects all the checkboxes. The form also has a combo box in the header that filters the records according to “agency type.” What I...
0
8968
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8787
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9334
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9259
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9208
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6053
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4569
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3279
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.