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?

Recommended Answers

All 2 Replies

try dis

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

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

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;

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.