Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to pass long query string
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01563515
Message ID:
01563522
Views:
63
This message has been marked as the solution to the initial question of the thread.
>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";
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform