patriciaxxx
Programmer
I have the code writing out the appropriate schema.ini like so. The schema resides in the correct folder with the database and text file.i need to use schema and not export / import specification.
Open "C:\Grouping\schema.ini" For Output As #4
sch1 = strTblName
sch2 = "ColNameHeader = True"
sch3 = "CharacterSet = ANSI"
sch4 = "Format = Delimited(,)"
sch5 = "TextDelimiter=^"
sch6 = "Decimal=."
sch7 = "MaxScanRows=1"
Print #4, "[" & sch1 & "]"
Print #4, sch2
Print #4, sch3
Print #4, sch4
Print #4, sch5
Print #4, sch6
Print #4, sch7
Close #4
And I have the Export going like this:
DoCmd.TransferText acExportDelim, schema, "tblMyTableName", CurrentProject.Path & "\MyTableName.txt", True
And what I get is a text file where the FIRST ROW ONLY (i.e. the headers) use ^ as the text delimiter, and all the subsequent lines use quotes, the schema settings just don't seem to effect them at all.
I have tried every permutation of headers true / false, including them or not, and tried .txt and .csv files, but I can’t work out what is wrong or how to get it to work properly.
Please can anyone help me.
Open "C:\Grouping\schema.ini" For Output As #4
sch1 = strTblName
sch2 = "ColNameHeader = True"
sch3 = "CharacterSet = ANSI"
sch4 = "Format = Delimited(,)"
sch5 = "TextDelimiter=^"
sch6 = "Decimal=."
sch7 = "MaxScanRows=1"
Print #4, "[" & sch1 & "]"
Print #4, sch2
Print #4, sch3
Print #4, sch4
Print #4, sch5
Print #4, sch6
Print #4, sch7
Close #4
And I have the Export going like this:
DoCmd.TransferText acExportDelim, schema, "tblMyTableName", CurrentProject.Path & "\MyTableName.txt", True
And what I get is a text file where the FIRST ROW ONLY (i.e. the headers) use ^ as the text delimiter, and all the subsequent lines use quotes, the schema settings just don't seem to effect them at all.
I have tried every permutation of headers true / false, including them or not, and tried .txt and .csv files, but I can’t work out what is wrong or how to get it to work properly.
Please can anyone help me.