Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to pass long query string
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01563515
Message ID:
01563523
Vues:
51
>>Hi everybody,
>>
>>I am just wondering what is the best way to pass query string to SqlCommand.ExecuteQuery.
>>
>>I would have used @ to construct it, but @is used for parameter. So, do I constuct it as several parts concatenated with + or do I need to do it through StringBuilder?
>>
>>Thanks in advance.
>
>What is the problem with @?
>This works for me:
>
>String Something = @"SELECT * FROM SomeTable WHERE Id = @Id";
>
Hmm, I thought it will not work, so I already coded with StringBuilder. Let me re-try.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform