schema.ini (again) sure Access is not reading it.

R

Rod

I have data file and schema.ini file both in same folder.

I am fairly sure that Access is ignoring the file as the results do not
change if it is not there.
The file is imported, but if there is a £ sign in the csv file the data item
is replaced by null.
Also if I change things like date format to mm/dd/yy the end result is
unchanged.

HELP


The schema.ini and csv files are below.

I import the file with the VBA code (Using Office XP)

DoCmd.TransferText acImportDelim, , "Test Table", "C:\Data\Test.csv", True

The schema file is

[Test.csv]
ColNameHeader=True
Format = CSVDelimited
Col1=MyLong Long
Col2=MyString Text
Col3=MyDate DateTime
Col4=MyBoolean Bit
Col5=MyMoney Currency
DateTimeFormat = dd/mm/yyyy
CurrencySymbol = £
CurrencyPosFormat = £1
CurrencyNegFormat = -£1
CurrencyDecimalSymbol =.

The csv file is as below
MyLong,MyString,MyDate,MyBoolean,MyMoney

1,a,23/02/2006,Yes,1

2,Bee,12/12/2009,No,£3.33

3,SEA,01/02/2009,,2.2

4,four,19/12/2000,Yes,0.01

34,34,,Yes,0.5
 
R

Ritwik Shukla

Try the open recordset method.....

Function TestSchema()
Dim db As DATABASE, rs As Recordset
Set db = OpenDatabase("c:\my documents", False, _
False,"TEXT;Database=c:\my documents;table=Test.csv")
Set rs = db.OpenRecordset("Test.csv")

rs.MoveLast
Debug.Print "Record count= " & rs.RecordCount
rs.Close

End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top