Hi friends i want to read a csv file and then store it in sql server 2005 table , know how to read a file but i don't know how do i write it in the table. plz help me
jitupatil_2007
0
Newbie Poster
Recommended Answers
Jump to PostThere are a number of ways to do this.
Using directing insert statement is one, another is using a stored procedure, calling as ssis package is another.The easiest is probably the insert statement.
Simple get you SqlConnection, then use an SqlCommand.use the string.Format method to parse …
Jump to PostHere is a version of your code that was slightly modified, and works on a table with a few thousand rows.
The problem with the ""Input array is longer than the number of columns in this table." error is that the file has a column with an embedded comma. …
Jump to Post"The only thing you can do is to inspect the line for commas, and replace them with a special character, then split, then find the special character and change it back into a comma."
After some thought, this statement probably won't work. If your CSV has the text columns …
All 11 Replies
JerryShaw
46
Posting Pro in Training
jitupatil_2007
0
Newbie Poster
JerryShaw
46
Posting Pro in Training
JerryShaw
46
Posting Pro in Training
jitupatil_2007
0
Newbie Poster
JerryShaw
46
Posting Pro in Training
jitupatil_2007
0
Newbie Poster
harivb
0
Newbie Poster
JerryShaw
46
Posting Pro in Training
mukharanja
0
Newbie Poster
AITM_1
0
Newbie 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.