adoquery Datatype decision based on 51% of the records...
Posted on 2004-08-16
I really hope somebody can help me with the
following ;) :
I have a program reading the records from an excel file using the connection
'Data Source=' + Form1.ED_filename.Text + ';' +
'Extended Properties="Excel 8.0;HDR=YES;MaxScanRows=0;MaxBufferSize=2048";';
and getting the fields type with:
for loopint:=0 to adoquery1.FieldCount-1 do
The Problem I have is that in a column called 'PurchaseOrder' I have 80% of the values that are numeric (like '0008332')
and 20% that are strings (like 'M002233')
When I use datatype, it returns FLOAT. I've tested it using the default 16 rows and inserting records like 9 strings and 7 values
(it returns STRING) and 9 values and 7 strings (it return FLOAT).
The problem is that if I have a field that has both Values and Text... it should return text, not values.
Thank you in advance!