Click here to Skip to main content
16,016,760 members
Home / Discussions / C#
   

C#

 
QuestionConcurrency violation: the UpdateCommand affected 0 of the expected 1 records. Pin
Member 395385612-Nov-08 20:23
Member 395385612-Nov-08 20:23 
AnswerRe: Concurrency violation: the UpdateCommand affected 0 of the expected 1 records. Pin
Claudia P11-Feb-09 5:20
Claudia P11-Feb-09 5:20 
QuestionCan i use Windows Vista cursor "aero_busy.ani" in my windows application ? [modified] Pin
Krishnraj12-Nov-08 19:45
Krishnraj12-Nov-08 19:45 
QuestionSetting default validation summary Pin
Ajit S12-Nov-08 19:35
Ajit S12-Nov-08 19:35 
AnswerRe: Setting default validation summary Pin
AhsanS12-Nov-08 20:34
AhsanS12-Nov-08 20:34 
QuestionPass DataSet from Project1 to Project2 Pin
Illegal Operation12-Nov-08 16:36
Illegal Operation12-Nov-08 16:36 
AnswerRe: Pass DataSet from Project1 to Project2 Pin
N a v a n e e t h12-Nov-08 16:42
N a v a n e e t h12-Nov-08 16:42 
AnswerRe: Pass DataSet from Project1 to Project2 Pin
Vimalsoft(Pty) Ltd12-Nov-08 23:01
professionalVimalsoft(Pty) Ltd12-Nov-08 23:01 
hi Illegal Operation

Why do you return an Object? You asked me an Unclear Question in my Article. Let me explain Briefly.

Illegal Operation :Wrote

My DataAccessLayer Method looks something like this:

public object GetData(DataSet dsMyDataSet)
{
//some logic
return dsMyDataSet;
}


In your Getdata Function, you are Doing strange things, you return an Object and you asked us how to pass a dataset across DAL and BLL, First you have to change that object to a Dataset, and another thing in your Parameters, logically i dont know what you are trying to do. Your are accepting a Dataset as a Parameter and at the same time your want to return a dataset. When you getdata,it must be either void or search using something like string ,int etc not dataset. If you want to Pass the Dataset in this case you can change you function to look like this

public Dataset GetData()
{
return dsMyDataSet;
}
;

and lets come to your BLL

Illegal Operation :Wrote

My BusinessLogicLayer looks something like this:

public object GetData1()
{
datalayer = new datalayer();
datalayer.method();
}


Here again you return an Object, with what control are you going to bind the Object? Your Code

datalayer = new datalayer();


will not Compile, you did not create an Object of a Class. Your BLL Should look like this

;
public Dataset GetData1()
{
datalayer obj = new datalayer();
Dataset ds = new Dataset();
 ds = obj.GetData();
return ds;
}
;

After you have this , you can bind it to any Control that you like.


Smile | :)

Vuyiswa Maseko,

Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding

VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za


GeneralRe: Pass DataSet from Project1 to Project2 Pin
Illegal Operation13-Nov-08 12:21
Illegal Operation13-Nov-08 12:21 
GeneralRe: Pass DataSet from Project1 to Project2 Pin
Vimalsoft(Pty) Ltd13-Nov-08 19:33
professionalVimalsoft(Pty) Ltd13-Nov-08 19:33 
QuestionLimitation of scroll of row header and column header Pin
kakel200812-Nov-08 15:08
kakel200812-Nov-08 15:08 
Questionhow to make exception serializable Pin
George_George12-Nov-08 14:22
George_George12-Nov-08 14:22 
AnswerRe: how to make exception serializable Pin
N a v a n e e t h12-Nov-08 17:03
N a v a n e e t h12-Nov-08 17:03 
GeneralRe: how to make exception serializable Pin
George_George12-Nov-08 17:52
George_George12-Nov-08 17:52 
GeneralRe: how to make exception serializable Pin
N a v a n e e t h12-Nov-08 19:38
N a v a n e e t h12-Nov-08 19:38 
GeneralRe: how to make exception serializable Pin
George_George12-Nov-08 21:25
George_George12-Nov-08 21:25 
GeneralRe: how to make exception serializable Pin
N a v a n e e t h13-Nov-08 15:09
N a v a n e e t h13-Nov-08 15:09 
GeneralRe: how to make exception serializable Pin
George_George16-Nov-08 2:15
George_George16-Nov-08 2:15 
QuestionC# HttpWebRequest + Cookie ¿Sessions? Pin
fasfasdf12-Nov-08 14:14
fasfasdf12-Nov-08 14:14 
Questionobject? Pin
dec8212-Nov-08 14:02
dec8212-Nov-08 14:02 
AnswerRe: object? Pin
Guffa12-Nov-08 14:37
Guffa12-Nov-08 14:37 
GeneralRe: object? Pin
dec8212-Nov-08 15:03
dec8212-Nov-08 15:03 
GeneralRe: object? Pin
Mbah Dhaim12-Nov-08 15:43
Mbah Dhaim12-Nov-08 15:43 
GeneralRe: object? Pin
Dave Kreskowiak12-Nov-08 15:47
mveDave Kreskowiak12-Nov-08 15:47 
GeneralRe: object? Pin
Paul Conrad12-Nov-08 17:10
professionalPaul Conrad12-Nov-08 17:10 

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.