select name from sysdatabases
解决方案 »
- 数组如何拼接呢?
- 求高手帮助
- c#读取Excel2003中的数据时出现错误!!小弟不知道该怎么解决。那位老大来帮帮忙啊!!!!
- [进者有分]请问如何在WinFrom窗口中编辑DataGrid中的数据,然后将它们提交到数据库?
- 又是一个字符串问题,请大家帮我看看吧!谢谢了!
- datagridview控件的问题 显示两个表的问题
- 如何在C#中像VC中那样发送消息?我是菜鸟……
- SqlParameterCollection 仅接受非空的 SqlParameter 类型对象。参数名: value
- 在C#中如何调用WINDOWS API
- 在C#中,连接dbf数据表的连接字符串怎么写
- 在datagrid的实现互换排序
- winform选择打印机直接打印
{
string connstr="Data Source=" + txtServer.Text + ";User id=" + txtName.Text + ";Password=" + txtPwd.Text + "; Initial Catalog=master";
sqlconn=new SqlConnection(connstr);
sqlconn.Open();
//
sqlcom=new SqlCommand("select name from sysdatabases",sqlconn);
SqlDataReader myReader = sqlcom.ExecuteReader();
try
{
comboBox1.Items.Clear();
while (myReader.Read())
{
comboBox1.Items.Add(myReader.GetString(0));
}
}
finally
{
myReader.Close();}
}
可是,如果是oracle或是其他什么的数据库,那有该当如何?