|
This is an asp.net forum originally, it is not convenient to discuss in-depth database issues. Your question has something to do with ado.net, just answer it briefly:
Your first way, assuming the syntax is correct, then the compiler first converts the variable bb to a string (using the object's ToString method), and then combines the string into a sql variable. You can set a breakpoint to see what the result of the sql variable is, and see if the command sent to the database is what you mean by submitting binary image data.
In the first way, SQL is not the correct logical meaning at all.
The second method is very standard, and it is clear that ado.net's SQL command parameters are designed in this way, there is nothing to say. |
|