excel odbc insert problem
I am building a program in C# that combines several different excel files into one excel file with several sheets. The excel driver does not support batch queries, so I must insert into the new sheet line by line. The problem that I am running into is that I have one sheet that fails to allow the insert after a number of them have already been inserted.
my error is-
System.Data.Odbc.OdbcException: ERROR:[HY001] [Microsoft][ODBC Excel Driver] Cannot open any more tables.
I know it is not the connections, I know it is not the amount of data being inserted into the table.
Previous insert statments that are almost identical work, and it consistently fails on the same records, but if you try the same record more than once it will often work.
I have no clue and would appreciate the help
This may work, but I haven't tried because I have one other thing that I am trying to do. I need to place all the data I select out of the one sheet in the other sheet as text. So I need to format them all with "'" + DataReader.GetValue(x).ToString().Replace("'","") + "'".
additional information: If I just catch the error and let the program continue it will do other inserts into the same sheet. Still looking for explanation, but I appreciate the help so far.