I use a SQLDataAdapter to select/update/insert data from/to a table in MS SQL Server (.NET Framework 4.0 as client framework). The UpdateCommand in the SQLDataAdapter needs 2 float parameters, which I add like this:
With _sqlDA_Prot_Points.UpdateCommand
.Parameters.Add(New SqlParameter("@Alm_PLUS", SqlDbType.Float, 1, "Alm_PLUS"))
.Parameters.Add(New SqlParameter("@Alm_MINUS", SqlDbType.Float, 1, "Alm_MINUS"))
end with
My regional settings are it-IT. When the DataAdapter tries to update my DataTable changed rows to the server, the Float parameters in the SQLServer Profiler show up with a "," instead of a "." as decimal separator, causing an exception. I found no way to tell the DataAdapter how to convert the double to a string using the "." instead of the ",".
Any idea?
Thank you in advance