Public static bool UpdateBulkCustomerInfo(SqlCommand cmd, BulkTable)Ĭonst string BulkTableName = "CustomerInfo" Ĭmd.CommandText = "DELETE FROM CustomerInfo" sqlBulk.DestinationTableName = "TMS_UserLogin" SqlBulk.DestinationTableName = "TMS_FacultyDetails" sqlBulk.DestinationTableName = "TMS_AddressDetails" SqlBulkCopy sqlBulk = new SqlBulkCopy(strConnection) OleDbCommand cmd = new OleDbCommand("Select, from ", excelConnection) OleDbCommand cmd = new OleDbCommand("Select, from ", excelConnection) OleDbCommand cmd = new OleDbCommand("Select, ,, ,, ,, from ", excelConnection) OleDbCommand cmd = new OleDbCommand("Select, ,, from ", excelConnection) Create OleDbCommand to fetch data from Excel OleDbConnection excelConnection = new OleDbConnection(excelConnectionString) String excelConnectionString = Source=" + path + " Extended Properties=Excel 12.0 Persist Security Info=False" Create connection string to Excel work book String strConnection = "Integrated Security=SSPI Persist Security Info=False Data Source=TWS-ERPSERVER\\SQLEXPRESS Initial Catalog=AsnASoftwaresolutionDB" String strConnection = "Integrated Security=false Persist Security Info=False Data Source=TWS-ERPSERVER\\SQLEXPRESS Initial Catalog=AsnASoftwaresolutionDB" String strConnection = "Integrated Security=false Persist Security Info=False Data Source=199.79.62.22 Initial Catalog=fashvash_inifdvashi User ID=inifd_user #" String strConnection = "Integrated Security=false Persist Security Info=False Data Source=SQL-SERVER Initial Catalog=schoolerpsoft User ID=sa Password=techmodi123" Protected void btnSend_Click(object sender, EventArgs e) ("Can not insert new record into database by SQLBulkInsert.", exc) (column, column) ĭataTable dataTable = ToDataTable(records, entityType) SqlBulkCopy.DestinationTableName = tableName įoreach (string column in listTableColumn) SqlBulkCopy sqlBulkCopy = new SqlBulkCopy(sqlConnection) SqlConnection sqlConnection = new SqlConnection(this._connectionString) Try to create bulk copy through sqlconnection Public void BulkInsert(IEnumerable records, string tableName, List listTableColumn, Type entityType)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |