I'm able to select an entire table from an Access database, into a CSV using the following code via VB.NET:
Dim AccessCommandCust As New OleDbCommand("SELECT * INTO [Text;DATABASE=C:\TEMP].[CUSTOMERS.csv] FROM Customers", AccessConn)
However, I don't need the entire table, just two columns -- Firstname and Lastname. The SQL is simple enough, but when I attempt this using the following code:
Dim AccessCommandCust As New OleDbCommand("SELECT FirstName, LastName INTO [Text;DATABASE=C:\TEMP].[CUSTOMERS.csv] FROM Customers", AccessConn)
It raises an exception:
Microsoft Jet database engine could not find the object 'CUSTOMERS.csv').
I'm trying to figure out where I'm going wrong.