OleDbConnection Problem...
-
Hi, I need to read a csv file...I m using OleDB Connection for this i have done this code...
OleDbConnection conCSV = new OleDbConnection( "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + dirName + ";Extended Properties='Text;HDR=Yes;FMT=Delimited;IMEX=1'" ); OleDbDataAdapter daDBF = new OleDbDataAdapter ( "SELECT * FROM " + fileName, conCSV ); daDBF.Fill( DS, "Bids" ); DS.WriteXML( TestFilePath );
But I m not Getting Full Data out, From CSV file some of the Data gets Truncated On Server It's Working fine On My local Machine... Can Anybody sort out this...Pls :wtf: Thanx & Reagards Anuj Kamthan Software Developer Solversa Technologies, Pune - 411007, India. http://www.solversa.com -- modified at 6:11 Friday 24th March, 2006 -
Hi, I need to read a csv file...I m using OleDB Connection for this i have done this code...
OleDbConnection conCSV = new OleDbConnection( "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + dirName + ";Extended Properties='Text;HDR=Yes;FMT=Delimited;IMEX=1'" ); OleDbDataAdapter daDBF = new OleDbDataAdapter ( "SELECT * FROM " + fileName, conCSV ); daDBF.Fill( DS, "Bids" ); DS.WriteXML( TestFilePath );
But I m not Getting Full Data out, From CSV file some of the Data gets Truncated On Server It's Working fine On My local Machine... Can Anybody sort out this...Pls :wtf: Thanx & Reagards Anuj Kamthan Software Developer Solversa Technologies, Pune - 411007, India. http://www.solversa.com -- modified at 6:11 Friday 24th March, 2006 -
See if you can do something like daDBF.CommandTimeOut(3000); or something. You should set the OleDBCommand.CommandTimeout setting higher than the default 30 seconds first t see if it rectify's the situation.. Practice sesquipedalianism! ;)
Thanks a lot for your interest :-O But Problem is different it's not because of timeout... When i m reading the csv file and filling it in to dataset...whole records ll copied in to dataset but, there is an column in my csv file "Description" only this column's data ll truncate if it's very big... Is there any limit in dataset...Can't save more then 255 character in a column. Thanx :) Anuj Kamthan Software Developer Solversa Technologies, Pune - 411007, India. http://www.solversa.com