I have an application in which I generate either an array or a dataset from answers to a test (usually about 35 in length)
Currently, I make 35 trips to the database with code something like
string[,] scorray = new string[100, 5];
bool Success = false;
for (int i = 0; i <= scorray.GetUpperBound(0); i++)
Success = AddToDb(scorray[i,0], scorray[i,1];
Is there anyway I could send the array as a dataset to SQL Sever and then use that dataset/table as a parameter which would be inserted into the the table at the SQL server end?
If so, what would the C# code look like, what would the T-SQL look like? Would it be much faste?
Any help appreciated.