On Wed, 2 Feb 2005 10:14:27 -0500, "Brett" <no@spam.com> wrote:
¤ I'd like to see pseudo code (or actual example is better) explaining how to
¤ export data from an MS Access table to a CSV file.
The following will export with the column names in the first row of the CSV file:
Function ExportAccessToText() As Boolean
Dim AccessConn As New System.Data.OleDb.OleDbConnection("Provider=Micros oft.Jet.OLEDB.4.0;"
& _
"Data Source=e:\My Documents\db1.mdb")
AccessConn.Open()
Dim AccessCommand As New System.Data.OleDb.OleDbCommand("SELECT * INTO [Text;DATABASE=e:\My
Documents\TextFiles].[Table3.csv] FROM Table_3", AccessConn)
AccessCommand.ExecuteNonQuery()
AccessConn.Close()
End Function
Paul ~~~
pc******@ameritech.net
Microsoft MVP (Visual Basic)