|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Schema.ini for all textfiles in the folderi try to import several cvs-files into a database. These csv's are delimited by a "|". (don't ask me why it's named csv then ;-) ..Net seems to ignore my settings in the connectionstring: ....Properties=""text;HDR=Yes;FMT=Custom-Delimited(|)""" i get a table with one field like name|street|phone and so on So i created a schema.ini and it works with one file, but: in my folder are up to 500 csv-files and im not willing to write all that stuff. now here is my question: is there a way for a global setting for that folder? in schema.ini i tried [*.csv] format=delimited(|) but it didn't work. i could read out all names (changing daily) of that folder an create a schema.ini, but in that case time plays a role and i would be glad if i coud save this time. thanks chris On 21 Nov 2006 03:50:23 -0800, "Kris" <moonpat***@freenet.de> wrote: ¤ Hi,¤ ¤ i try to import several cvs-files into a database. ¤ These csv's are delimited by a "|". (don't ask me why it's named csv ¤ then ;-) ¤ ¤ .Net seems to ignore my settings in the connectionstring: ¤ ¤ ...Properties=""text;HDR=Yes;FMT=Custom-Delimited(|)""" ¤ ¤ i get a table with one field like name|street|phone and so on ¤ ¤ So i created a schema.ini and it works with one file, but: ¤ in my folder are up to 500 csv-files and im not willing to write all ¤ that stuff. ¤ ¤ now here is my question: ¤ is there a way for a global setting for that folder? in schema.ini i ¤ tried ¤ ¤ [*.csv] ¤ format=delimited(|) ¤ ¤ but it didn't work. ¤ ¤ i could read out all names (changing daily) of that folder an create a ¤ schema.ini, but in that case time plays a role and i would be glad if i ¤ coud save this time. Unfortunately you will need an entry for each file. The only possible alternative would be to change the default delimiter for the Text ISAM in the Registry. You could also create your schema.ini and entries dynamically using code. http://www.mentalis.org/soft/class.qpx?id=6 Paul ~~~~ Microsoft MVP (Visual Basic) |
|||||||||||||||||||||||