Which steps do you have problems with? There are numerous examples of
creating and adding data to access databases. I would read the CSV into a
list of a list of strings, with File.ReadAllLin es and String.Split.
"a" <a@a.netwrote in message news:ONjPK7y7IH A.5596@TK2MSFTN GP02.phx.gbl...
Dear friends
>
I want import data from CSV file to mdb file How can I do that in vb.net?
>
>
And do not follow the examples that use Jet4 database driver to open the
CSV file as a database - Jet4 may not be present on all target
distribution machines and is no longer included in MDAC. Parse it
yourself as Family Tree Mike suggested. Be careful if you use your app
on machines localized for non-US. If you grab any floating point fields
and use Convert.ToDoubl e() you need to use a format provider to make
sure decimal points are interpreted correctly (for instance in Germany
they use a comma instead of a period for "decimal point" and a period
instead of a comma for group separation).
In English the dot is a decimal point seperator and the comma for thousands
In all other European languages that is a comma for decimal point (it has
that name of course not in those languages) and a dot as comma seperator.
Cor
"breitak67" <guest@unknow n-email.comschree f in bericht
news:fdc82b3411 06d6efa020cb6cf 89aba28@nntp-gateway.com...
>
And do not follow the examples that use Jet4 database driver to open the
CSV file as a database - Jet4 may not be present on all target
distribution machines and is no longer included in MDAC. Parse it
yourself as Family Tree Mike suggested. Be careful if you use your app
on machines localized for non-US. If you grab any floating point fields
and use Convert.ToDoubl e() you need to use a format provider to make
sure decimal points are interpreted correctly (for instance in Germany
they use a comma instead of a period for "decimal point" and a period
instead of a comma for group separation).
>
>
--
breitak67
In a way it does have something to do with US - most, but not all,
English regional settings use the dot and comma as we do in the US. For
instance, English (South Africa) uses a comma instead of a period for
decimal separation, while some European regional settings, such as
French (Switzerland) and German (Lichtenstein), use a period for a
decimal separator as we do in the US (but an apostrophe for group
separation). My point was that if he deploys his app outside the US he
needs to check the localization settings he is likely to encounter there
and adapt his app appropriately.
"Family Tree Mike" <FamilyTreeMike @ThisOldHouse.c omwrote in message
news:6961BF7D-8B03-4F5F-81D7-6EE4434BE0FC@mi crosoft.com...
Which steps do you have problems with? There are numerous examples of
creating and adding data to access databases. I would read the CSV into a
list of a list of strings, with File.ReadAllLin es and String.Split.
This method won't actually let you read many CSV files. If comma or carriage
returns ever show up as data it will give invalid results.
The easiest method (in my opinion) is to use the Microsoft Text ODBC driver
instead.
Comment