Click here to Skip to main content
15,900,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello there
i have this command in my insert class

"cmd.Parameters.Add("@Ususername", SqlDbType.NVarChar).Value = username;"

pls, help me to get the sqldbtype
in another word i don't know the type of username, therefor i want to get it automaticly
Posted

1 solution

Try:
C#
cmd.Parameters.AddWithValue("@Ususername", username);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900