Float in Database to ? in .NET

前端 未结 6 2289
花落未央
花落未央 2020-12-30 20:06

If you have a float in MSSQLServer, to what do you map this in .NET?

Can you convert it to Double or will you lose numbers?

6条回答
  •  抹茶落季
    2020-12-30 20:40

    Check out:

    • SQL Server Data Types and Their .NET Framework Equivalents (msdn) for full reference on data type mappings between SQL Server and .Net

    In your case SQL Server native type float maps to SQL Server CLR SqlDouble and then Double in .Net

    Update (May 2016):

    Updated version of the msdn document: Mapping CRL Parameter Data

提交回复
热议问题