I have problem with select statement in which i am using decimal number as a parameter. Value that i use in insert is decimal type and that works fine. Also when i make select with round number select do it's work. but if i enter decimal number some error with conversion happens.
Piece of code that's part of select statement :
sWhere = sWhere & " (Koeficijent = '" & CDec(frmStats.txtKoef.Text) & "')"
end error is here :
Try
Dim adapter2 As New SqlClient.SqlDataAdapter(utakmice.utakmice_SQL, con)
con.Open()
adapter2.Fill(DS)
dgStats.DataSource = DS.Tables(0)
dgStats.Update()
con.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
on adapter2.fill(DS) it says that conversion from varchar to numeric failed
don't get it
HELP !!
Piece of code that's part of select statement :
sWhere = sWhere & " (Koeficijent = '" & CDec(frmStats.txtKoef.Text) & "')"
end error is here :
Try
Dim adapter2 As New SqlClient.SqlDataAdapter(utakmice.utakmice_SQL, con)
con.Open()
adapter2.Fill(DS)
dgStats.DataSource = DS.Tables(0)
dgStats.Update()
con.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
on adapter2.fill(DS) it says that conversion from varchar to numeric failed
don't get it
HELP !!