SQL Server Bulk Insert (VB.Net) -
i use sqlbulkcopy move values csv file sql server. problem have csv double quoted , comma delimited. believe sqlbulkcopy won't work double quotes code behind delimiter. know if there way values in "as is", or stuck cleaning quotes? 1 reason prefer against values contain commas such as...
"value 1","company, inc","value 2"
by cleaning double quotes, introduce new commas.
the code have follows...
dim file new streamreader(companylistfile) dim csv new lumenworks.framework.io.csv.csvreader(file, true, ","c) dim copy new sqlbulkcopy(objconn) copy.destinationtablename = "[companylist]" copy.writetoserver(csv)
any ideas appreciated, thanks!
Comments
Post a Comment