I am using vb.net and want to insert data from a .csv file into a table. I
am looking everywhere but am coming up empty. Can someone be so kind as to
post some sample code for me?

Thank you.

Mike B

Re: Insert to SQL Server from a text file by William

William
Wed Mar 03 15:57:05 CST 2004

Use this as your connection string... Driver={Microsoft Text Driver (*.txt;
*.csv)};Dbq=Directory:\YourFolder\;Extensions=csv;

www.connectionstrings.com
"Michael Barrett" <mchaelfbarrett@remthis_yahoo_thistoo.com> wrote in
message news:eNKkjGWAEHA.2576@TK2MSFTNGP11.phx.gbl...
> I am using vb.net and want to insert data from a .csv file into a table. I
> am looking everywhere but am coming up empty. Can someone be so kind as to
> post some sample code for me?
>
> Thank you.
>
> Mike B
>
>



Re: Insert to SQL Server from a text file by Michael

Michael
Thu Mar 04 06:29:05 CST 2004

This is a multi-part message in MIME format.

------=_NextPart_000_0065_01C401BA.5F8DCD50
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable


> Use this as your connection string... Driver=3D{Microsoft Text Driver =
(*.txt;
> *.csv)};Dbq=3DDirectory:\YourFolder\;Extensions=3Dcsv;

It asks for a Provider, so I used "Provider=3DMicrosoft.Jet.OLEDB.4.0;" =
and it gives me the "Can't find Installable ISAM" error.
------=_NextPart_000_0065_01C401BA.5F8DCD50
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1252">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>&gt; Use this as your connection string... =
Driver=3D{Microsoft=20
Text Driver (*.txt;<BR>&gt;=20
*.csv)};Dbq=3DDirectory:\YourFolder\;Extensions=3Dcsv;<BR></FONT></DIV>
<DIV><FONT size=3D2>It asks for a Provider, so I used=20
"Provider=3DMicrosoft.Jet.OLEDB.4.0;" and it gives me the "Can't find =
Installable=20
ISAM" error.</FONT></DIV></BODY></HTML>

------=_NextPart_000_0065_01C401BA.5F8DCD50--