TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
vishalsethia
NA
32
0
Index was outside the bounds of array
Mar 9 2005 12:35 PM
Hi, I'am trying to import a Text file which is delimited by a 'Tab Space ' into my database . Everything works until i try to give the insert myCommand.CommandText = "INSERT INTO SYS_PARTS VALUES ('" & fields(0) & "', '" & fields(1) & "', '" & fields(2) & "', '" & fields(3) & "', '" & fields(4) & "', '" & fields(5) & "', '" & fields(6) & "', '" & fields(7) & "','" & fields(8) & "','" & fields(9) & "','" & fields(10) & "','" & fields(11) & "','" & fields(12) & "','" & fields(13) & "','" & fields(14) & "','" & fields(15) & "','" & fields(16) & "','" & fields(17) & "')" If i try to print the data using console.writeline , it prints me the data correctly Console.WriteLine("INSERT INTO SYS_PARTS VALUES ('" & fields(0) & "', '" & fields(1) & "', '" & fields(2) & "', '" & fields(3) & "', '" & fields(4) & "', '" & fields(5) & "', '" & fields(6) & "', '" & fields(7) & "','" & fields(8) & "','" & fields(9) & "','" & fields(10) & "','" & fields(11) & "','" & fields(12) & "','" & fields(13) & "','" & fields(14) & "','" & fields(15) & "','" & fields(16) & "','" & fields(17) & "')") This consoled Output , if i try to insert into the table , the record gets inserted without giving any error ,but if i try to do usin mycommand.commandtext and myCommand.ExecuteNonQuery() , it shows me this error Index was outside the bounds of array
Reply
Answers (
2
)
Obtain AutoIncrement Field Data after Insert operation in Oracle
Binding a single DataRow to form members