Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / July 2005



Tip: Looking for answers? Try searching our database.

Using ADO to import a csv file into a record set

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
PaulW - 29 Jul 2005 18:34 GMT
Hi,

We are using ADO to read a csv file into a record set. The VB connection we
are using:

connectstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Path &
";Extended Properties=""text; HDR=Yes; Format=Delimited"""

This usually works. We now have files with records similar to:

PFC300,Yes,Yes,No,S-01,3507,Q70,A02,A1,A01,,,,

The value "S-01" is being imported as -1. We also have values "SF-01" being
imported as -1.

If there a way to get the data entered correctly.

tia

Paul
Ralph - 29 Jul 2005 19:13 GMT
> Hi,
>
[quoted text clipped - 16 lines]
>
> Paul

You could re-write your csv file to add quotes for a string-delimiter and
give ADO a better opportunity to 'guess' what you want, or you need to
investigate using a schema file.

http://msdn.microsoft.com/library/en-us/dnclinic/html/scripting03092004.asp

-ralph
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.