[ kimistan @ 23.09.2005. 12:42 ] @
Zdravo, istu temu sam postavio i u MSSQL ali mi niko ne odgovara! Imam problem u transakciji u .NET-u. Koristim SqlTransaction object. Takodje dialup connection za konekciju na server. Na serveru MSDE2000 instaliran. Evo koda koji koristim za parent-child data. this.cn.Open(); if( this.cn.State == ConnectionState.Open ) { tx = this.cn.BeginTransaction(System.Data.IsolationLevel.ReadUncommitted); this.daParent.InsertCommand.Transaction = tx; this.daDetail.InsertCommand.Transaction = tx; this.daParent.Update(ds); this.daDetail.Update(ds); // DialUp connection break here tx.Commit(); bOK = true; } } catch(Exception exp) { bOK = false; try { tx.Rollback(); } catch (Exception ex) { MessageBox.Show("An exception of type " + ex.GetType() + ex.Message + " was encountered while attempting to roll back the transaction."); } strError = "The following exception occured: " + exp.Message; MessageBox.Show(strError); } finally { if( this.cn.State == ConnectionState.Open ) this.cn.Close(); } Kao sto vidite koristim Read uncommitted isolation level. Kada mi pukne konekcija pre tx.Commit command moje Parent i child tabele ce biti zakljucane.Kada stratujem SQL Enterprise manager ne vidim podatke u tabeli. The error code is 1222 (Lock request time-out period exceeded.) Kada startujem program sa druge masine isto ne mogu da vidim podatke posto tabele ostaju zakljucane. Hvala! |