Click here to Skip to main content
15,892,805 members
Home / Discussions / C#
   

C#

 
GeneralRe: No knews there... still no answer [modified] Pin
_Erik_26-Oct-10 4:21
_Erik_26-Oct-10 4:21 
GeneralRe: No knews there... still no answer Pin
_Erik_26-Oct-10 5:22
_Erik_26-Oct-10 5:22 
GeneralRe: Amazing, tnx it's working :) Pin
leeoze26-Oct-10 7:22
leeoze26-Oct-10 7:22 
Questionhow to Preventing double submit in ASP Pin
Sasmi_Office25-Oct-10 22:27
Sasmi_Office25-Oct-10 22:27 
AnswerRe: how to Preventing double submit in ASP Pin
Arun Jacob25-Oct-10 22:54
Arun Jacob25-Oct-10 22:54 
Questionstore procedure or sql command Pin
sa.alavifar25-Oct-10 20:52
sa.alavifar25-Oct-10 20:52 
AnswerRe: store procedure or sql command Pin
dan!sh 25-Oct-10 21:45
professional dan!sh 25-Oct-10 21:45 
AnswerRe: store procedure or sql command Pin
Keith Barrow25-Oct-10 21:46
professionalKeith Barrow25-Oct-10 21:46 
Using a stored procedure is generally considered better. The SQL Server can create an execution plan which speeds the execution up. You also get built in protection against SQL injection attacks.

Whatever you do don't use an SQL string statement like this (without parameters):
string sql = "Select * from Table where name = " + idTextBox.Text;

as a hacker can type in SQL to the text box idTextBox and manipulate your DB, this is called SQL injection. Because Stored Procedures use parameters anyway, they are protected against this.


Finally, I'd suggest looking at the following: LinqToSql, The Entity Framework, NHibernate. These map C# objects to relational databases, you will find that this removes the need for a lot of boilerplate code. It looks like you have a new development, so using these technologies will probably be better, but YMMV.

GeneralRe: store procedure or sql command Pin
sa.alavifar25-Oct-10 22:20
sa.alavifar25-Oct-10 22:20 
GeneralRe: store procedure or sql command Pin
Pete O'Hanlon25-Oct-10 22:25
mvePete O'Hanlon25-Oct-10 22:25 
GeneralRe: store procedure or sql command Pin
OriginalGriff25-Oct-10 23:21
mveOriginalGriff25-Oct-10 23:21 
GeneralLittle Bobby Tables Pin
Keith Barrow26-Oct-10 1:39
professionalKeith Barrow26-Oct-10 1:39 
GeneralRe: Little Bobby Tables Pin
OriginalGriff26-Oct-10 1:46
mveOriginalGriff26-Oct-10 1:46 
GeneralRe: Little Bobby Tables Pin
Keith Barrow26-Oct-10 2:18
professionalKeith Barrow26-Oct-10 2:18 
GeneralRe: Little Bobby Tables Pin
OriginalGriff26-Oct-10 2:23
mveOriginalGriff26-Oct-10 2:23 
AnswerRe: store procedure or sql command Pin
PIEBALDconsult26-Oct-10 3:28
mvePIEBALDconsult26-Oct-10 3:28 
GeneralRe: store procedure or sql command Pin
AspDotNetDev26-Oct-10 7:36
protectorAspDotNetDev26-Oct-10 7:36 
GeneralRe: store procedure or sql command Pin
PIEBALDconsult26-Oct-10 15:27
mvePIEBALDconsult26-Oct-10 15:27 
AnswerRe: store procedure or sql command [modified] Pin
RaviRanjanKr26-Oct-10 4:38
professionalRaviRanjanKr26-Oct-10 4:38 
GeneralRe: store procedure or sql command Pin
AspDotNetDev26-Oct-10 7:14
protectorAspDotNetDev26-Oct-10 7:14 
AnswerRe: store procedure or sql command Pin
brunoseixas28-Oct-10 5:29
brunoseixas28-Oct-10 5:29 
QuestionAbout generics [solved] Pin
E. del Ayre25-Oct-10 16:27
E. del Ayre25-Oct-10 16:27 
AnswerRe: About generics Pin
PIEBALDconsult25-Oct-10 16:58
mvePIEBALDconsult25-Oct-10 16:58 
GeneralRe: About generics Pin
Luc Pattyn25-Oct-10 17:00
sitebuilderLuc Pattyn25-Oct-10 17:00 
GeneralRe: About generics Pin
E. del Ayre25-Oct-10 17:01
E. del Ayre25-Oct-10 17:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.