sql - SqlBulkCopy exception, find the colid -


using sqlbulkcopy , getting exception:

received invalid column length bcp client colid 30.

i've been banging head against 1 hours. know row having issue, don't know column "colid 30" is. there 178 columns in data table. values seem correct , don't see longer column data types in database.

this database holds property listings , has on 3 million records, of fine.

is there way pinpoint colid 30 is? or there way view actual sql bcp submitting database?

i hope helps solve else's issues well.

the error because 1 of string/varchar fields in datatable had semicolon ";" in it's value. apparently need manually escape these before doing insert!

i did loop through rows/columns , did:

string.replace(";", "char(59)"); 

after that, inserted smoothly.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -