我需要用户选择系统数据源和用户数据源。请问在C#中有什么方法可以解决?在线等待

解决方案 »

  1.   

    string a,b;
    string conn="Data Source="+a+"; Integrated Security=SSPI;Initial Catalog="+b;
    为a、b赋值就行了
      

  2.   

    string a,b;
    a=textBox1.text;b=textBox2.text;
    string conn="Data Source="+a+"; Integrated Security=SSPI;Initial Catalog="+b;
    string comm1 = "SELECT * FROM users";
    SqlDataAdapter da = new SqlDataAdapter(comm1,conn);
    DataSet ds = new DataSet();
    da.Fill(ds,"users");或者string conn="Data Source="+textBox1.text+"; Integrated Security=SSPI;Initial Catalog="+textBox2.text;
    string comm1 = "SELECT * FROM users";
    SqlDataAdapter da = new SqlDataAdapter(comm1,conn);
    DataSet ds = new DataSet();
    da.Fill(ds,"users");
      

  3.   

    用comboBox绑定数据源
    抱歉,代码在家里,现在没有
      

  4.   

    楼主去下面的网页看看吧
    http://topic.csdn.net/t/20041127/10/3593330.html
      

  5.   

    我需要绑定的是管理工具中数据源 (ODBC)建立的系统DSN和用户DSN.可能提问没说清楚,非常抱歉。
      

  6.   

    select * from dba_users
      

  7.   

    查询oracle中所有用户信息 
       1. 查询oracle中所有用户信息       select  * from dba_users;   2. 只查询用户和密码       select username,password from dba_users;    3. 查询当前用户信息       select * from dba_ustats;   4. 查询用户可以访问的视图文本       select * from dba_varrays;   5. 查询数据库中所有视图的文本       select * from dba_views;
      

  8.   

    oracle
    查询oracle数据库
    select name from V$database(select  * from dba_users where username='GXPT')
    查询oracle中所有用户信息 
       1. 查询oracle中所有用户信息       select  * from dba_users;   2. 只查询用户和密码       select username,password from dba_users;    3. 查询当前用户信息       select * from dba_ustats;   4. 查询用户可以访问的视图文本       select * from dba_varrays;   5. 查询数据库中所有视图的文本       select * from dba_views;查询表名
    select * from dba_tables where owner =(select  username from dba_users where username='GXPT')查询列名
    select * from user_tab_columns where table_name=(select table_name from dba_tables where owner =(select  username from dba_users where username='GXPT') and table_name='GXPT')