Re: What is the "@" for?
- From: "Ignacio Machin \( .NET/ C# MVP \)" <ignacio.machin AT dot.state.fl.us>
- Date: Wed, 8 Jun 2005 09:17:42 -0400
hi,
where you got that query from?
I bet it was from a stored procedure, if that is so you cannot use it from
C# and ADO.NET you have to use ? instead
and remember to add the value to the Parameters collection.
google this: "parameterized queries" site:msdn.microsoft.com
cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Jason Huang" <JasonHuang8888@xxxxxxxxxxx> wrote in message
news:ubA1q2$aFHA.796@xxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> Would someone tell me what's the "@" for in the folloing code?
>
> SqlCommand cmd = new SqlCommand( "SELECT * FROM Products WHERE ProductID
> = @ProductID", con("Server=localhost; DataBase=Northwind; uid=YY;
> password=XXXXXX"));
>
> Thanks a lot.
>
> Jason
>
.
- Follow-Ups:
- Re: What is the "@" for?
- From: RvGrah
- Re: What is the "@" for?
- References:
- What is the "@" for?
- From: Jason Huang
- What is the "@" for?
- Prev by Date: DDE
- Next by Date: Re: GUID isn't unique?
- Previous by thread: Re: What is the "@" for?
- Next by thread: Re: What is the "@" for?
- Index(es):
Relevant Pages
|