Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old January 23rd, 2006, 03:15 PM
stokefan@gmail.com
Guest
 
Posts: n/a
Default 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.

  #2  
Old January 23rd, 2006, 03:25 PM
Danny J. Lesandrini
Guest
 
Posts: n/a
Default Re: Deleting table entries from MS Access db from just an entry via web form

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("txtLastNameSearch") & "';"

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
dlesandrini@hotmail.com
http://amazecreations.com/datafast


<stokefan@gmail.com> wrote ...[color=blue]
> 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.
>[/color]


  #3  
Old January 23rd, 2006, 03:25 PM
stokefan@gmail.com
Guest
 
Posts: n/a
Default Re: Deleting table entries from MS Access db from just an entry via web form

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.

  #4  
Old January 23rd, 2006, 03:35 PM
Danny J. Lesandrini
Guest
 
Posts: n/a
Default Re: Deleting table entries from MS Access db from just an entry via web form

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
dlesandrini@hotmail.com
http://amazecreations.com/datafast


<stokefan@gmail.com> wrote ...[color=blue]
> 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.
>[/color]


  #5  
Old January 23rd, 2006, 03:35 PM
stokefan@gmail.com
Guest
 
Posts: n/a
Default Re: Deleting table entries from MS Access db from just an entry via web form

Thanks very much for your help.

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles