I have a application which take data from CSV and dump to the respective table
using SQLBULKCOPY
I am using the same connection string for truncating data from the same table
and while writing to server
SqlBulkCopy bc = new SqlBulkCopy(connection_string1.ConnectionString, SqlBulkCopyOptions.TableLock);
bc.WriteToServer(dt);//Its giving exception on this line
I am not getting what is wrong
Arjun_Sarankulu -3
Junior Poster
Recommended Answers
Jump to Postpost a screen shot of the error or some data
Jump to PostBased on the error, I'd say that
System.Configuration.ConfigurationManager.AppSettings["database"]
doesn't have valid userid/password in it.
All 5 Replies
sandeepparekh9 109
Posting Whiz
Arjun_Sarankulu -3
Junior Poster
Momerath 1,327
Nearly a Senior Poster Featured Poster
Stefan_Lam88 0
Junior Poster
Arjun_Sarankulu -3
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.