zhengshuoyu
New member
- Local time
- Today, 13:13
- Joined
- Aug 30, 2010
- Messages
- 1
I have a csv file the datas appear like this
12/22/2009,11:20,3377.49,3378.29,3375.68,3375.68,3377.30,72368512,28534142976
I have used the following code:
DoCmd.TransferText acImportDelim, , "PriceOfIndex", "D:\5MinData\XXXX.csv", False
It works well to identify the date. But the some of the last two integer numbers are greater than 2.1E10. So there is something wrong when imports the data. So I chage a way. as
schema.ini
[XXXX.csv]
ColNameHeader = False
Format = Delimited(,)
MaxScanRows = 0
CharacterSet = ANSI
Col1 = "Date" Date Width 8
Col2 = "Time" Date Width 8
Col3 = "P1" Double Width 8
Col4 = "P2" Double Width 8
Col5 = "P3" Double Width 8
Col6 = "P4" Double Width 8
Col7 = "P5" Double Width 8
Col8 = "V1" Double Width 8
Col9 = "V2" Double Width 8
--------------------------------------------------------------------------------------
SELECT * INTO 123
FROM [Text;FMT=Delimited;HDR=No;DATABASE=C:\;].[XXXX#csv];
But this method can't identify the date. pls help me~
By the way, what does the HDR =No mean. because I should change it to HDR = yes sometimes or I can't import the data
12/22/2009,11:20,3377.49,3378.29,3375.68,3375.68,3377.30,72368512,28534142976
I have used the following code:
DoCmd.TransferText acImportDelim, , "PriceOfIndex", "D:\5MinData\XXXX.csv", False
It works well to identify the date. But the some of the last two integer numbers are greater than 2.1E10. So there is something wrong when imports the data. So I chage a way. as
schema.ini
[XXXX.csv]
ColNameHeader = False
Format = Delimited(,)
MaxScanRows = 0
CharacterSet = ANSI
Col1 = "Date" Date Width 8
Col2 = "Time" Date Width 8
Col3 = "P1" Double Width 8
Col4 = "P2" Double Width 8
Col5 = "P3" Double Width 8
Col6 = "P4" Double Width 8
Col7 = "P5" Double Width 8
Col8 = "V1" Double Width 8
Col9 = "V2" Double Width 8
--------------------------------------------------------------------------------------
SELECT * INTO 123
FROM [Text;FMT=Delimited;HDR=No;DATABASE=C:\;].[XXXX#csv];
But this method can't identify the date. pls help me~
By the way, what does the HDR =No mean. because I should change it to HDR = yes sometimes or I can't import the data