c# - Database connection by connection string returns null -


i try connection between database using connection string , in app.config. problem variable adapter returns null , desired data not read. find no error in code .

datatable ds;  string con = system.configuration.configurationmanager.connectionstrings["dbconnect"].connectionstring; using (sqlconnection conn = new sqlconnection(con)) {     sqldataadapter adapter;     adapter = new sqldataadapter("select a.aaa, m.bbb, m.ccc m.ddd lst_mdmel_lis_tab m (nolock) inner join lst_absae_tab (nolock) on a.id = m.id m.bbb >= 30 , m.fff= 35 order a.aaa", conn);      ds = new datatable(" ");     adapter.fill(ds);     datagridview1.datasource = ds;  } 

where m.bbb>= '30' , m.fff= '35' 

>= comparison operator numerical values. therefore, if m.bbb numerical value along m.fff correct syntax be

where m.bbb >= 30 , m.fff= 35 

Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -