I think this is VS. The problem is not the Sql server. Here I pass the amount in the line ("12.89") to the stored procedure and find the data, keeping the exact 12.89
Decision -
Change float to string in properties and methods procedure
Note
do not change float column type for row in table
Example -
In your property
Public Float Amount { get; set; }
TO
Public String Amount { get; set; }
In your method
Public boolAdd(String amount) { //Your Logic Like bool status = false; DbParam[] param = new DbParam[1]; param[0] = new DbParam("@amount", "", "amount", SqlDbType.VarChar); status = Db.Update(ds, "sp_Add", "", "", param, true); return status; }
In your procedure
Note-Amount column - Float type in the table does not change to sting
Create Proc sp_Add ( @amount varchar(20) ) as begin Insert into Price(amount) values (@amount) end
Dheeraj shukla
source share