Actual SQL data type of SqlParameter - ADO.NET

Q.  How do you determine the actual SQL data type of a SqlParameter (the type expected by the SQL Server)?
- Published on 19 Oct 15

a. It is the .NET Framework data type in your application that the parameter represents.
b. It is the type of column or data in SQL Server that the command expects.
c. It is the type of column in a DataTablethat it represents.
d. It is any type defined in the SqlDbDataTypeenumeration.

ANSWER: It is the type of column or data in SQL Server that the command expects.
 

    Discussion

  • Ramesh   -Posted on 19 Oct 15
    Parameters are just like variable that you can use to pass and return values between your application and a database. You have to pass same type of parameter that is available in sql table’s coloumn. Parameter data types are assigned by using System.Data.SqlDbType enumeration. You can pass parameter values to SQL statements and stored procedures.

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)