Click here to Skip to main content
16,004,919 members
Home / Discussions / Database
   

Database

 
Questionset global max_allowed_packet=16777216 Pin
WhiteGirl2314-Jun-07 3:19
WhiteGirl2314-Jun-07 3:19 
AnswerRe: many to many relationship Pin
originSH14-Jun-07 1:40
originSH14-Jun-07 1:40 
GeneralRe: many to many relationship Pin
sangramkp14-Jun-07 1:49
sangramkp14-Jun-07 1:49 
GeneralRe: many to many relationship Pin
Giorgi Dalakishvili14-Jun-07 2:14
mentorGiorgi Dalakishvili14-Jun-07 2:14 
GeneralRe: many to many relationship Pin
sangramkp14-Jun-07 2:29
sangramkp14-Jun-07 2:29 
GeneralRe: many to many relationship Pin
Giorgi Dalakishvili14-Jun-07 2:33
mentorGiorgi Dalakishvili14-Jun-07 2:33 
GeneralRe: many to many relationship Pin
sangramkp14-Jun-07 18:59
sangramkp14-Jun-07 18:59 
Question"oledbexception:could not update currently locked". Pin
tomertro14-Jun-07 1:03
tomertro14-Jun-07 1:03 
Hi
i am using data base Access 2000.

my code implemnting nestsed transactions where using more then one connection
i get the following exception: "oledbexception:could not update currently locked".

i cant put the whole code but i can demonstrate:



if (!Modified) return;

Modified=false;

OleDbTransaction transaction =null;

try

{


OleDbCommand command = new OleDbCommand();

command.Connection=conn;

transaction=conn.BeginTransaction();

command.Transaction=transaction;

command.CommandType = System.Data.CommandType.Text;

command.CommandText = "Delete * from tab";

command.ExecuteNonQuery();



try

{

OleDbConnection secondCon=GetAnotherConnection();

MyClasss.SaveTo(secondCon,Number)

}

catch(Exception ex)

{



throw new Exception("Can't save " + ex.ToString());

}





MyClasss

{



public void SaveTo(OleDbConnection conn,int Number)

{

OleDbTransaction transaction =null;


try

{


OleDbCommand command = new OleDbCommand();

command.Connection=conn;

transaction=conn.BeginTransaction(System.Data.IsolationLevel.ReadUncommitted);

command.Transaction=transaction;

command.CommandType = System.Data.CommandType.Text;



command.CommandText = "Update [Field Records] " +

" SET " +

"[ Cost Periodic]='" + (periodic?"True":"False") + "';";

command.ExecuteNonQuery();

transaction.Commit();

}

catch(Exception ex)

{

if(transaction!=null)

{

transaction.Rollback();

}

throw new Exception("Can't save" + ex.ToString());

}



}





}




Please give your advice.
Thanks in advance.

QuestionTo save a file in a SQL 2005 Pin
Saranya B13-Jun-07 23:44
Saranya B13-Jun-07 23:44 
AnswerRe: To save a file in a SQL 2005 Pin
Colin Angus Mackay14-Jun-07 1:01
Colin Angus Mackay14-Jun-07 1:01 
GeneralRe: To save a file in a SQL 2005 Pin
Giorgi Dalakishvili14-Jun-07 1:53
mentorGiorgi Dalakishvili14-Jun-07 1:53 
QuestionTo get the data from another table... Pin
codingrocks13-Jun-07 23:32
codingrocks13-Jun-07 23:32 
Questioninvalid objects Pin
manni_n13-Jun-07 22:16
manni_n13-Jun-07 22:16 
AnswerRe: invalid objects Pin
Sylvester george13-Jun-07 22:39
Sylvester george13-Jun-07 22:39 
AnswerRe: invalid objects Pin
Colin Angus Mackay13-Jun-07 23:07
Colin Angus Mackay13-Jun-07 23:07 
QuestionHow to return cursor from stored proc?? Pin
FishiFishi13-Jun-07 22:08
FishiFishi13-Jun-07 22:08 
AnswerRe: How to return cursor from stored proc?? Pin
Tirthadip13-Jun-07 22:36
Tirthadip13-Jun-07 22:36 
AnswerRe: How to return cursor from stored proc?? Pin
N a v a n e e t h14-Jun-07 23:22
N a v a n e e t h14-Jun-07 23:22 
QuestionHow to get top n records Pin
FishiFishi13-Jun-07 22:00
FishiFishi13-Jun-07 22:00 
AnswerRe: How to get top n records Pin
Tirthadip13-Jun-07 22:32
Tirthadip13-Jun-07 22:32 
Questionhow to call a webservice from stored procedure in SQL Server2000? Pin
chronossu13-Jun-07 21:27
chronossu13-Jun-07 21:27 
Questioncreate alias and tables on my pc and copy them with setup or create them in installed pc Pin
upamir13-Jun-07 21:19
upamir13-Jun-07 21:19 
QuestionText datatype not exceeding 8000 characters Pin
Rajiya13-Jun-07 20:51
Rajiya13-Jun-07 20:51 
AnswerRe: Text datatype not exceeding 8000 characters Pin
Krish - KP13-Jun-07 23:21
Krish - KP13-Jun-07 23:21 
AnswerRe: Text datatype not exceeding 8000 characters Pin
Mike Dimmick14-Jun-07 9:20
Mike Dimmick14-Jun-07 9:20 

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.