c# - How to get decimal number without decimal separator using OleDbDataAdapter (Fixed Length Text File)? -


let's suppose have fixed length text file 3 columns, 2 of them double 2 decimal places have no separator (like dot or comma):

21318545 22422523 65498798 65465463 

using oledbdataadapter have create schema.ini file, , i'm trying this:

[numbers.txt] colnameheader=false format=fixedlength numberdigits=2 decimalsymbol= col1="a" short width 2 col2="b" double width 3 col3="c" double width 3 

and retrieve datatable:

var dataadapter = new oledbdataadapter("select a, b, c [numbers.txt]", "provider=microsoft.ace.oledb.12.0;data source=numbers.txt;extended properties="text;hdr=no;");  var datatable = new datatable(); dataadapter.fill(datatable); 

i datatable following values:

   b       c 21  3.18    5.45 22  4.22    5.23 65  4.98    7.98 65  4.65    4.63 

but assigning empty decimalsymbol= in schema.ini doesn't work. woudn't calculations retrieve these fields or iterate file/datatable add decimal separator each number, divide 100 or that, because numbers.txt has many double columns parse.

any idea appreciated.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -