-
Import from CSV to a SQL table on a remote server using VBA Access
Hello All,
We are migrating to Access 2013 from 2010 and from SQL 2008 to 2016. To import a CSV file, I used the Docmd.TransferText command and that did the import easily as it was to a local access table.
Now I have issues when trying to import the data from CSV to a remote SQL table. I copied the file to the SQL server box where the 2016 database is and used the below for the transfer.
str1 = "BULK INSERT Temp3 " & _
"FROM 'C:\Bulk\FileExchange_Response_49636101_49.csv'" & _
"WITH (FIRSTROW = 2, FIELDTERMINATOR = ',', " & _
"ROWTERMINATOR = '\\n', TABLOCK)".
This does not throw any error however, does not import the data.
Could anyone please shed any ideas to import the data from the CSV.
Thanks
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules