Click here to Skip to main content
15,921,622 members
Home / Discussions / C#
   

C#

 
AnswerRe: DELEDTING DATABASE through C# asp.net program ,ms sql database Pin
Colin Angus Mackay22-Sep-05 2:24
Colin Angus Mackay22-Sep-05 2:24 
Questioncan't load ruleml into dataset Pin
pramod.21c22-Sep-05 1:40
pramod.21c22-Sep-05 1:40 
AnswerRe: can't load ruleml into dataset Pin
Dave Kreskowiak22-Sep-05 5:24
mveDave Kreskowiak22-Sep-05 5:24 
QuestionCheck if user has admin rights Pin
Stefan_ Spenz22-Sep-05 1:24
Stefan_ Spenz22-Sep-05 1:24 
QuestionExplain DataSet.AcceptChanges and DataAdapter.Update methods. Pin
webC#22-Sep-05 1:17
webC#22-Sep-05 1:17 
AnswerRe: Explain DataSet.AcceptChanges and DataAdapter.Update methods. Pin
Ming Luo22-Sep-05 2:01
Ming Luo22-Sep-05 2:01 
AnswerRe: Explain DataSet.AcceptChanges and DataAdapter.Update methods. Pin
kundan.apiit15-Apr-12 4:19
kundan.apiit15-Apr-12 4:19 
QuestionLockout Pin
mikica1722-Sep-05 1:17
mikica1722-Sep-05 1:17 
Hi,
I have problem when using transaction in .NET.
I use SqlTransaction object. I am also using dialup connection
to connect to my server. On server I have database install in MSDE.
In code below I have to save some 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();
}

As you can see I use Read uncommitted isolation level.

If my dialup connection break before tx.Commit command my Parent and child table will be locked.
When I start SQL Enterprise manager I can not see data in that tables.
The error code is 1222 (Lock request time-out period exceeded.)
So, if I start program on the other machine and try to look data in that tables I can't
see them because my tables are still locked.
Does anyone have any sugesstion how to solve this problem.


Thanks
Mikica
AnswerRe: Lockout Pin
Guffa22-Sep-05 1:36
Guffa22-Sep-05 1:36 
GeneralRe: Lockout Pin
mikica1722-Sep-05 2:09
mikica1722-Sep-05 2:09 
GeneralRe: Lockout Pin
Guffa22-Sep-05 9:31
Guffa22-Sep-05 9:31 
QuestionInvoke without properties Pin
Yoyosch22-Sep-05 0:04
Yoyosch22-Sep-05 0:04 
AnswerRe: Invoke without properties Pin
Guffa22-Sep-05 1:04
Guffa22-Sep-05 1:04 
AnswerRe: Invoke without properties Pin
Yoyosch22-Sep-05 1:53
Yoyosch22-Sep-05 1:53 
GeneralRe: Invoke without properties Pin
Guffa22-Sep-05 9:29
Guffa22-Sep-05 9:29 
GeneralRe: Invoke without properties Pin
Yoyosch22-Sep-05 9:44
Yoyosch22-Sep-05 9:44 
QuestionEncryption/Decryption API in C#.NET Pin
Suseel kumar P22-Sep-05 0:02
Suseel kumar P22-Sep-05 0:02 
AnswerRe: Encryption/Decryption API in C#.NET Pin
Niklas Ulvinge22-Sep-05 1:13
Niklas Ulvinge22-Sep-05 1:13 
AnswerRe: Encryption/Decryption API in C#.NET Pin
hakervytas22-Sep-05 1:33
hakervytas22-Sep-05 1:33 
AnswerRe: Encryption/Decryption API in C#.NET Pin
Dave Kreskowiak22-Sep-05 5:21
mveDave Kreskowiak22-Sep-05 5:21 
QuestionInsert new record into MySQL problem Pin
Ming Luo22-Sep-05 0:01
Ming Luo22-Sep-05 0:01 
AnswerRe: Insert new record into MySQL problem Pin
sreejith ss nair22-Sep-05 0:53
sreejith ss nair22-Sep-05 0:53 
GeneralRe: Insert new record into MySQL problem Pin
Ming Luo22-Sep-05 1:03
Ming Luo22-Sep-05 1:03 
GeneralRe: Insert new record into MySQL problem Pin
Guffa22-Sep-05 1:08
Guffa22-Sep-05 1:08 
GeneralRe: Insert new record into MySQL problem Pin
sreejith ss nair22-Sep-05 17:30
sreejith ss nair22-Sep-05 17:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.