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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -