public void OnGenerateTable(object sender, EventArgs e) { string propertiesFile = Path.Combine(_binPath, "Database.Config"); //GetResult().Save(propertiesFile); IBatisNet.DataMapper.ISqlMapper mapper = CreateMapper(propertiesFile); mapper.Insert("generateTable", 0); }
public object Insert(string statementName, object parameter) { int deadLockRetry = 5; while (deadLockRetry > 0) { try { return(_sqlMapper.Insert(statementName, parameter)); } catch (SqlException ex) { if (ex.ErrorCode != 1205 || --deadLockRetry == 0) { throw; } } Thread.Sleep(5); } return(0); }