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..
Comments
Post a Comment