日期:2014-05-18  浏览次数:20397 次

我不懂VB 这行代码 麻烦帮我转成C#的 谢谢
datt = ws.tycx(sql, System.Configuration.ConfigurationManager.AppSettings("password")).Tables(0)

Dim sql As String = "select yhms,yhm,mm from yh where yhm='" & yhm1 & "' and mm='" & kl1 & "'"

------解决方案--------------------
应该就是获取到数据库的连接
之后执行这条查询语句

sqlconnection conn = new sqlconnection("连接串");
System.Configuration.ConfigurationManager这个不就是获取连接串的么