The sqlbulkcopy function works fine in my local environment but when I deploy it to IIS it only imports 17837 out of the 67K odd rows. Does anybody know what can cause this issue?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Actually the problem was with the Excel connection string I was missing the ‘IMEX=1’ at the very end. The correct connection string is – Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\uploaded.xlsx;Extended Properties=’Excel 12.0 Xml;HDR=YES;IMEX=1′”