获取sqldbtype为general [英] get sqldbtype for general

查看:83
本文介绍了获取sqldbtype为general的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好那里

i在我的插入类中有这个命令



cmd.Parameters.Add(@ Ususername,SqlDbType。 NVarChar )。值=用户名;



请帮助我获取sqldbtype

in another word我不知道用户名的类型,因此我想自动获取

解决方案

尝试:

 cmd.Parameters.AddWithValue(  @ Ususername,用户名); 


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

解决方案

Try:

cmd.Parameters.AddWithValue("@Ususername", username);


这篇关于获取sqldbtype为general的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆