I don't understand what does this @
means in HotspotID = @HotspotID
?
public BestFit CheckBestFit(String hotspotID)
{
String sql = "SELECT ZoomOut FROM Components WHERE HotspotID = @HotspotID";
Int32 value = 0;
}
I don't understand what does this @
means in HotspotID = @HotspotID
?
public BestFit CheckBestFit(String hotspotID)
{
String sql = "SELECT ZoomOut FROM Components WHERE HotspotID = @HotspotID";
Int32 value = 0;
}
It is the parameter in the query. However it seems as if you are not setting it
It's a bound parameter marker. You'll need to list all bound parameters in the Parameters collection.
Using bound parameters as opposed to just constructing the SQL text directly helps with security (prevents injection attacks) and performance.