A general question about SQL statement

From: Michael (m_at_m.com)
Date: 08/13/04


Date: Thu, 12 Aug 2004 17:10:13 -0700

Hi all,

I would like to get people's opinion about executing SQL statements in C#
(or any other .NET language really). I used to create my SQL statement by
building a string and replacing single quote with two single quotes.
Sometimes, I used SqlParameter. Maybe, I'm a bit lazy when I build the SQL
string. Should I always use SqlParameters? What are the
advantages/disadvantages between building SQL string and using SqlParameter?
Does one perform better than the other?

Thanks.
Michael



Relevant Pages

  • Re: How to write long string sentences
    ... Do you want to manage long SQL statements or do you want to manage long ... trying to manipulate the SQL statement as a string. ... I still question if you are wanting long string manipulation or simply ... If for some reason you don't want to use Visual Designers for managing your ...
    (microsoft.public.dotnet.languages.vb)
  • Re: User Define Array Data Type - Subscript out of range
    ... The absolute fastest way to do what you want would be to use SQL statements instead of looping code, but that would, of course, depend on what all you need to do. ... strDataType As String ... ' Load Array ...
    (microsoft.public.access.modulesdaovba)
  • Re: Writing bzcompressed data into SQL-DB?
    ... > when compressing strings with bzcompress, I have the problem that the ... > result apparently often contains 'letters' that mess up sql statements. ... > Of course I can urlencode the string, but that wont keep it as small. ...
    (comp.lang.php)
  • Re: regex search/replace syntax
    ... > $orderSQL is a string containing a number of SQL statements with the ... the placeholder is TOTAL not &total. ...
    (perl.beginners)
  • Re: Insert statement not updating table?
    ... straight SQL statements and not using them in VBA code...I had realized my ... >In VBA code in your form's module means something. ... In a SQL String it is ... >just 5 characters being passed to the Jet database engine and Jet does not ...
    (microsoft.public.access.formscoding)