Dear friends

I want import data from CSV file to mdb file How can I do that in vb.net?

Re: import data from CSV by Family

Family
Sat Jul 26 11:12:19 CDT 2008

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.ReadAllLines and String.Split.

"a" <a@a.net> wrote in message news:ONjPK7y7IHA.5596@TK2MSFTNGP02.phx.gbl...
> Dear friends
>
> I want import data from CSV file to mdb file How can I do that in vb.net?
>
>


Re: import data from CSV by breitak67

breitak67
Sun Jul 27 08:10:11 CDT 2008


And do not follow the examples that use Jet4 database driver to open th
CSV file as a database - Jet4 may not be present on all targe
distribution machines and is no longer included in MDAC. Parse i
yourself as Family Tree Mike suggested. Be careful if you use your ap
on machines localized for non-US. If you grab any floating point field
and use Convert.ToDouble() you need to use a format provider to mak
sure decimal points are interpreted correctly (for instance in German
they use a comma instead of a period for "decimal point" and a perio
instead of a comma for group separation)

--
breitak67

Re: import data from CSV by Cor

Cor
Sun Jul 27 08:45:59 CDT 2008

Hi,

In this case it has nothing to do with US.

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@unknown-email.com> schreef in bericht
news:fdc82b341106d6efa020cb6cf89aba28@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.ToDouble() 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


Re: import data from CSV by breitak67

breitak67
Sun Jul 27 16:59:27 CDT 2008


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. Fo
instance, English (South Africa) uses a comma instead of a period fo
decimal separation, while some European regional settings, such a
French (Switzerland) and German (Lichtenstein), use a period for
decimal separator as we do in the US (but an apostrophe for grou
separation). My point was that if he deploys his app outside the US h
needs to check the localization settings he is likely to encounter ther
and adapt his app appropriately

--
breitak67

Re: import data from CSV by Andrew

Andrew
Mon Jul 28 22:21:47 CDT 2008

"Family Tree Mike" <FamilyTreeMike@ThisOldHouse.com> wrote in message
news:6961BF7D-8B03-4F5F-81D7-6EE4434BE0FC@microsoft.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.ReadAllLines 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.

Andrew Faust