I would need to insert with VBA code a lot of rows into a table. I have a local tab-separated text file (C:\MyFile.txt) that I print from Excel and would need to upload the data in it into my SQL server table "MyTable". I tried with:
BULK Insert MyTable FROM 'C:\MyFile.txt' WITH(FIELDTERMINATOR = '\t',ROWTERMINATOR = '\n')
but it insists c:\MyFile.txt doesn't exist (I'm sure it does).
How am I supposed to refer to c:\MyFile.txt? With MySQL this worked easily using LOAD INFILE.