RE: Problem with CSDK3.0TC1 and .Net 2.0
Posted in 2007
Hi: The Informix Dynamic Server version 7.31 and not 7.1. Sorry for the typo. Thanks, Arindam Mukherjee > _____________________________________________ > From: Mukherjee, Arindam > Sent: Tuesday, June 05, 2007 9:10 AM > To: 'ids@iiug.org' > Cc: Amitava Chakraborty > Subject: Problem with CSDK3.0TC1 and .Net 2.0 > > Hi: > > When we were creating the Data Access Layer for Employee profile we > encountered a strange behaviour of CSDK3.0. > > We were able to establish the connection, but when we fired an sql > statement we got an communication link failure error. The Sql > statement did not succeed even once. > > The code we used is some thing like this > > DataTable resltTable; > DbProviderFactory dbFact = > dbProviderFactories.GetFactory("IBM.Data.Informix"); > DbConnection dbCnn = dbFact.CreateConnection(); > dbCnn.ConnectionString = "Server=xyz; DataBase=pqr; User Id=venkat; > Host=home; Protocol=onsoctcp; service=12345; Password=ppas" > dbCnn.Open(); // the connection succeds up till this point > DbCommand dbCmd = dbFact.CreateCommand(); > dbCmd.CommandText = "Select * from aadtempl where em_last_name like > 'S%'"; > dbCmd.Connection = dbCnn; > DbDataAdapter dbAdapt = dbFact.CreateDataAdapter(); > dbAdapt .SelectCommand = dbCmd; > dbAdapt.fill(resltTable);//the execption saying communication link > failure gets thrown from here. > > We are using Informix IDS 7.1 version. > > Please help us in this regard. > > Thanks, > Arindam Mukherjee >