Techy wrote:
> thanks guys i really appreciate your help, but now that
I have done this I
> would like to know more abotu SQL injection
>
> can anyone of you explain me this Injection thing and
look at my code below
> and see if injection is possible to this code belwo
I can't say 100% but your using a paramatised command, so you
might be
safe.
Here is a good resource:
http://en.wikipedia.org/wiki/Sql_injection
One peace of advice I can give you is this, if your in
control of your
SQL server, make sure that the account that runs the sql
service is not
the default one, create a standard windows account dedicated
to it.
Also, create an sql user specifically for your front end
pages, and only
assign it privileges to the tables/views/stored procedures
that are used
on the front end. Have a separate sql user for the backend
that has
delete/update/create etc privileges. I learnt this the hard
way several
years ago, the pages were using an sql account that had full
admin
rights, and I got hacked via sql injection, and they had full
access to
my databases AND file system. They even created windows
accounts and
logged in via terminal services. The only thing I could do
was take the
server off line, reinstall from scratch and recode ALL my
pages that
used the database.
Steve