473,487 Members | 2,674 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

import data from CSV

a
Dear friends

I want import data from CSV file to mdb file How can I do that in vb.net?
Jul 26 '08 #1
5 1372
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.netwrote in message news:ON**************@TK2MSFTNGP02.phx.gbl...
Dear friends

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

Jul 26 '08 #2

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
Jul 27 '08 #3
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" <gu***@unknown-email.comschreef in bericht
news:fd******************************@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
Jul 27 '08 #4

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.
--
breitak67
Jul 27 '08 #5
"Family Tree Mike" <Fa************@ThisOldHouse.comwrote in message
news:69**********************************@microsof t.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

Jul 29 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1806
by: Olivier Noblanc ATOUSOFT | last post by:
Hello, In the botom of this post you will see my source code. The problem is when i launch main.py that doesn't make anything why ? Thanks olivier noblanc Atousoft...
3
6259
by: Doug Baroter | last post by:
Hi, One of my clients has the following situation. They use Access DB for data update etc. some business functions while they also want to view the Access data quickly and more efficiently in...
1
9714
by: DCM Fan | last post by:
Access 2K, SP3 on Windows 2K, SP4 All, I have an import spec set up with quoted Identifiers and comma-separated values. The text file is produced by a 3rd-party program of which I have no...
1
6677
by: Dan | last post by:
Could someone please help me with auto importing a series of data files into an Access table. I tried to follow code given below in a previous messagebut i'm getting error messages. Here's my...
4
3006
by: Steve Jorgensen | last post by:
I'm restarting this thread with a different focus. The project I'm working on now id coming along and will be made to work, and it's too late to start over with a new strategy. Still, I'm not...
3
3691
by: deko | last post by:
I've been trying to use the Access Import Wizard to expedite importing data into my mdb. The nice thing about the wizard is that I can import from different file formats - txt, xls, even Outlook -...
10
2540
by: shumaker | last post by:
I don't need a detailed description of a solution(although I wouldn't mind), but I am hoping someone could tell me in general the best path to go about accomplishing a task, since I don't know all...
4
6070
by: Bruce W. Roeser | last post by:
All, I'm reading a book by Charles Petzold (Programming VS.Net). Pretty good content but am confused about the difference. From the text: ...
3
2275
by: Chris | last post by:
Hi, 1) In file test.aspx, i put: <%@ Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="test" %> <%@ import namespace="System.Data"%> <%@ import...
10
1579
by: nisp | last post by:
Hi all ! I'm trying to capture stderr of an external module I use in my python program. I'm doing this by setting up a class in my module overwriting the stderr file object method write. The...
0
7106
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7137
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7181
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6846
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7349
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5442
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3076
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1381
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
267
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.