Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

lockout na sql table

[es] :: .NET :: lockout na sql table

[ Pregleda: 1927 | Odgovora: 0 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

kimistan
Mihailo Stanisic
Novi Sad

Član broj: 5921
Poruke: 36
*.beotel.net.



Profil

icon lockout na sql table 23.09.2005. u 12:42 - pre 226 meseci
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!
 
Odgovor na temu

[es] :: .NET :: lockout na sql table

[ Pregleda: 1927 | Odgovora: 0 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.