Solved

best way to write into database

Posted on 2011-02-19
3
248 Views
Last Modified: 2012-05-11

What is the best method to write data from a Web form into a table or database?
Currently I'm thinking of using stored procedure to write into and read from a table specially since there will be no way of SQL injection.

Is this a right approach? or there are better practical idea?

Thanks.
0
Comment
Question by:akohan
3 Comments
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 200 total points
ID: 34934847
Stored procedure is the best practice as it allows for better maintenance and protects from sql injection attacks.
0
 
LVL 16

Assisted Solution

by:BurnieP
BurnieP earned 50 total points
ID: 34934866
Like Jacko said,  you cannot go wrong with Stored Procedure for it's effiency and security.

If you are familiar with Linq, it can also be a valid option.
0
 

Author Comment

by:akohan
ID: 34934945

Thanks.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now