Used TextDriver to connect cvs , Problem while calculating MAX of column

Deepthiv

Active member
Joined
Oct 3, 2005
Messages
39
Programming Experience
3-5
Hi everyone,

i have a csv file with 1000 records with a column header and decimal values. In VB.Net using ADODB record set i want to display max ,Avg of every column.

Suppose a column have 0.0001,0.003,0.0123,0.1041,0.000087 as values and

when i used query Select Max(<column_name>) from abc.csv

Select Avg(<column_name>) from abc.csv and display in Excel

i am getting '0' as result , where i need max i.e 0.1041 as output

i tried to set precision for recordset , but run time error displayed saying "Operation not performed when instance is open...."Hi everyone,

i have a csv file with 1000 records with a column header and decimal values. In VB.Net using ADODB record set i want to display max ,Avg of every column.

Suppose a column have 0.0001,0.003,0.0123,0.1041,0.000087 as values and

when i used query Select Max(<column_name>) from abc.csv

Select Avg(<column_name>) from abc.csv and display in Excel

i am getting '0' as result , where i need max i.e 0.1041 as output

i tried to set precision for recordset , but run time error displayed saying "Operation not performed when instance is open...."

would like to have your thoughts on this


would like to have your thoughts on this

 
Problem while calculating MAX of column in CSV

Sorry for spam


This is my actual problem..

Hi everyone,

i have a csv file with 1000 records with a column header and decimal values. In VB.Net using ADODB record set i want to display max ,Avg of every column.

Suppose a column have 0.0001,0.003,0.0123,0.1041,0.000087 as values and

when i used query Select Max(<column_name>) from abc.csv

Select Avg(<column_name>) from abc.csv and display in Excel

i am getting '0' as result , where i need max i.e 0.1041 as output

i tried to set precision for recordset , but run time error displayed saying "Operation not performed when instance is open...."

would like to have your thoughts on this
 
I strongly suggest you use ADO.NET rather than ADO. I don't know whether that will solve the issue or not but you should be using ADO.NET in your .NET apps unless you have a very good reason not to.
 

Latest posts

Back
Top