c# - "Existing Connection forcibly closed by remote host" on filling the data set using DataAdapter -


i have been trying query oracle database using following code,

public dataset selectcustomerdetails(string custcode) {      string sql = @"select cust.name,cust.code,cust.caddr  cust      cust.code = '{0}'";       oledbconnection connection = new oledbconnection();      connection.connectionstring =system.configuration. configurationmanager.connectionstrings["oracledb"].connectionstring;       connection.open();       sql = string.format(sql, custcode);      oledbdataadapter da = new oledbdataadapter(sql, connection);       dataset custdataset = new dataset();      custdataset.locale = system.threading.thread.currentthread.currentculture;      da.fill(custdataset);      connection.close(); } 

i sure on method call, getting error "an existing connection forcibly closed remote host" in random fashion.. reason issue.. enter image description here


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -