dear all,
i am having this strange problem.
What i have done is i load a datatable to the sql server 2005 using
the sqlbulkcopy. when the column size of the destination table is
less than the value of the mapped column of the datatable instead of
throwing exception the sql server 2005 instead crashes. the only
exception that gets caught is the transport level error( TCP Provider,
error: 0 .......)
what is happening ???? i am so confused.
here is the part of the code:
.........
SqlConnection oSQLConn = new
SqlConnection();
oSQLConn.ConnectionString =
Config.GetConnectionString();
oSQLConn.Open();
try{
System.Data.SqlClient.SqlBulkCopy bc=
new System.Data.SqlClient.SqlBulkCopy(oSQLConn,
SqlBulkCopyOptions.TableLock, null);
..........................
............................// other part of the code the initializes
the
// DataTable with name dataTable
bc.BatchSize = 500;
bc.DestinationTableName = "desttable";
bc.WriteToServer(dataTable);
bc.close();
} catch(Exception exe){}
.....
if anyone knows what is wrong.. or what is going wrong then it
would be a great help to me.
this is causing a lot of headache....
regards,
kamal