"user" is keyword at SQL.
change to the sqlstring="Select top 1 * From [user]";If you only want to get the 1st recorder, use if instead of "while"if (myReader.Read())
{
label1.Text=myReader.GetString(0);
}
change to the sqlstring="Select top 1 * From [user]";If you only want to get the 1st recorder, use if instead of "while"if (myReader.Read())
{
label1.Text=myReader.GetString(0);
}
解决方案 »
- 安装WP7 SDK 和Blend4中文版冲突求解: incompatible language version of products
- 求个C#学习的QQ群!
- 用vs2010新建了一个WPF web application,为什么右键属性里面无法改“输出类型”?
- TextBox和RichTextBox无法输入中文、无法读取中文
- C#中两个窗口切换的问题
- 还是编码的问题
- 关于Mdi窗体间传值的问题
- 我刚学C#半年多点,有些程序能写出来,却不懂什么意思。这种情况该怎么解决? 麻烦各位大神给点建议C#该怎么学谢谢?
- 怎么在picturebox中加入类似百度地图的标注??
- 请教大家 c#中如何建一个类可以在两个buton_click中运用?
- HellMaster(李晋) 送给你的100分--------------------2
- 高分求助:如何通过编程实现在ad中为已经存在的用户添加邮箱。(分可以再加)
将sqlstring="Select * From user";
修改成 sqlstring="Select * From [user]"; 就行了