0

i cant really understand this error. from what am doing, "SS3B" comes from textbox6. and here is
the sql code to insert it to database. But it keeps giving the above error. Beside, i am not converting
anything. cmd.Parameters.AddWithValue("@FormedClass", TextBox6.Text.Trim()) Please where is this error coming from? And what is the solution please?

3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by crishlay
0

try dis

cmd.Parameters.AddWithValue("@FormedClass","'"+ TextBox6.Text.Trim()+"'")

..
for nvarchar data type it always assumes value without qoutaion as integer

0

i cant really understand this error. from what am doing, "SS3B" comes from textbox6. and here is
the sql code to insert it to database. But it keeps giving the above error. Beside, i am not converting
anything. cmd.Parameters.AddWithValue("@FormedClass", TextBox6.Text.Trim()) Please where is this error coming from? And what is the solution please?

cmd.Parameters.AddWithValue("@FormedClass", TextBox6.Text.Trim()).ToString;

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.