473,698 Members | 2,524 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Deleting table entries from MS Access db from just an entry via web form

Hi all,

I wondered if anyone knew if it was possible to delete entries in an MS
Access database table from just entering data into it?

I shall explain :

If you have a web form (in asp.net for example) where you can enter
details into the Access DB like "firstname" , and "biography" etc, is it
possible to enter a certain string in this web form which could delete
entries in that table?

Many thanks.

Jan 23 '06 #1
4 1714
Yes ... it's called SQL Injection.

I've never been able to get it to work, but I understand it's possible.

Let's say you had a search form with a LastName field for users to
enter text for the search. The embedded SQL might look like this:

strSQL = "SELECT * FROM MyTable WHERE LastName ='" & _
Request("txtLas tNameSearch") & "';"

If you enter "Smyth" as the last name, the SQL evaluates to this ...
SELECT * FROM MyTable WHERE LastName ='Smyth';

However, if someone enters this ... "(DELETE FROM MyTable)"
SELECT * FROM MyTable WHERE LastName ='(DELETE FROM MyTable)';

No, that doesn't work, does it. No, I can't get SQL Injection to work
against my embedded sql, but I understand it's possible. I'd love to see
a working example, but a search of Google on SQL Injection only
warned against it. Never did find a working example.
--

Danny J. Lesandrini
dl*********@hot mail.com
http://amazecreations.com/datafast
<st******@gmail .com> wrote ...
Hi all,

I wondered if anyone knew if it was possible to delete entries in an MS
Access database table from just entering data into it?

I shall explain :

If you have a web form (in asp.net for example) where you can enter
details into the Access DB like "firstname" , and "biography" etc, is it
possible to enter a certain string in this web form which could delete
entries in that table?

Many thanks.

Jan 23 '06 #2
Thanks Danny, that is great.

Do you know a simple method of securing against such a type of attack
on an Access database please?

Thanks.

Jan 23 '06 #3
Do a search for SQL Injection at Google Groups on ASP groups and
they'll tell you to move to Stored Procs instead of embedded SQL.

http://groups.google.com/groups?as_q...=2006&safe=off

--

Danny J. Lesandrini
dl*********@hot mail.com
http://amazecreations.com/datafast
<st******@gmail .com> wrote ...
Thanks Danny, that is great.

Do you know a simple method of securing against such a type of attack
on an Access database please?

Thanks.

Jan 23 '06 #4
Thanks very much for your help.

Jan 23 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2754
by: Nathan Bloom | last post by:
Hi, I have a data entry form (access 2000) that also allows the user to add, update, and delete records from the form. The Delete action is carried out in an event procedure and has the following code: Private Sub Command28_Click() On Error GoTo Err_Command28_Click
1
2391
by: KC | last post by:
Hello, I am using Access 2002. WinXP, Template from MS called Orders Mgmt DB. I have tweaked this DB to work for our small co. It has worked pretty well up until I made the mistake of deleting about 80 records from the Orders table. 80 out of a 1000 records. Now our data entry form shows our customer addresses, but not customer order history. When looking at all of the tables, customer, payments, orders, they still have all of the...
8
6809
by: kaosyeti | last post by:
i have a (hopefully) small problem. i have created a system where a user enters customer information into a table through a form. this table has no primary key. there are 9 fields on the form to be filled in, one of which is a date field. right now, i've been using this db myself and have entered only 10 days of sample data to check my calculations but i realized that there may be times when i need to add a record that was missed that...
5
3988
by: Manish | last post by:
The topic is related to MySQL database. Suppose a table "address" contains the following records ------------------------------------------------------- | name | address | phone | ------------------------------------------------------- | mr x | 8th lane | 124364 | | mr x | 6th lane | 435783 | | mrs x | 6th lane | 435783 |
21
3212
by: Johan Tibell | last post by:
I would be grateful if someone had a minute or two to review my hash table implementation. It's not yet commented but hopefully it's short and idiomatic enough to be readable. Some of the code (i.e. the get_hash function) is borrowed from various snippets I found on the net. Thee free function could probably need some love. I have been thinking about having a second linked list of all entries so that the cost of freeing is in proportion to...
2
1435
by: Mark | last post by:
I have a form with two sub forms. The form is set to data entry. The form is bound directly to a table I have two buttons at the bottom of the screen. One button is named reject and one is named accept. I would like the reject button to cancel the current entry being written to the table and the accept button to save the entry to the table. I have tried the form.undo command and DoCmd.RunCommand acCmdUndo but if you click on one of...
3
1463
by: 66sprite | last post by:
I am new to PHP and I am trying make a page that displays the entries in a table and then gives the option to delete a specific entry after checking it. I can get the page to display the entries and there is a link to delete the entry but it will not pass the variable to the second page that deletes the entry. Here is my code. This is the page that displays the entries: <?php include 'datacon.php'; $result = mysql_query("SELECT * FROM...
11
3670
by: shriil | last post by:
Hi I have this database that calculates and stores the incentive amount earned by employees of a particular department. Each record is entered by entering the Date, Shift (morn, eve, or night) and the 'employee name'. There is another table which assigns an ID to the Shifts, i.e. 1,2 and 3 for morn, eve & night shifts respectively. From the mother table, the incentive is calculated datewise for each employee as per his shift duty. In...
2
1487
by: helraizer1 | last post by:
Hi folks, I have a file for my chatbox called data.line, which the posts are in the layout CHATBOXTEXT 7 username=helraizer 1202416953
0
8609
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
9166
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9030
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
8899
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
8871
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
5861
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
4371
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...
0
4621
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2007
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.