• Yep, the format of the file is dictated to the client by me.

    Basically, we are providing a bulk import of items into his database. At the moment, my script uses the OPENROWSET command to pull in each uploaded CSV file (which is structured how I've set out) into a kind of 'preview' table where they can review the items to make sure all is ok then if so, pull them over to the main database content.

    so, there is more to it but the main import goes something like:

    insert into [preview_table](field1, field2...)

    select * from OPENROWSET('MSDASQL',

    'Driver={Microsoft Text Driver (*.txt; *.csv)};

    DEFAULTDIR=x:\my_file_path\;Extensions=CSV;',

    'SELECT * FROM [my_csv_file.csv]')