Click here to Skip to main content
15,888,610 members
Home / Discussions / C#
   

C#

 
QuestionHow to get signal strength of multi-AP from wireless net card using c# Pin
pandazhao28-Jul-10 9:27
pandazhao28-Jul-10 9:27 
AnswerRe: How to get signal strength of multi-AP from wireless net card using c# Pin
Roger Wright28-Jul-10 20:03
professionalRoger Wright28-Jul-10 20:03 
GeneralRe: How to get signal strength of multi-AP from wireless net card using c# Pin
pandazhao29-Jul-10 1:32
pandazhao29-Jul-10 1:32 
QuestionMessage Removed Pin
28-Jul-10 5:57
professionalalleyes28-Jul-10 5:57 
AnswerRe: Using assembly information from a different assembly Pin
William Winner28-Jul-10 10:37
William Winner28-Jul-10 10:37 
GeneralRe: Using assembly information from a different assembly Pin
alleyes28-Jul-10 10:56
professionalalleyes28-Jul-10 10:56 
GeneralRe: Using assembly information from a different assembly Pin
Pete O'Hanlon28-Jul-10 19:24
mvePete O'Hanlon28-Jul-10 19:24 
Questionproblem using dataRelation in dot net Pin
Dhyanga28-Jul-10 4:17
Dhyanga28-Jul-10 4:17 
I have been trying to solve the problem related with using dataRelation but still couldn't figure it out. I hope somebody can help me with this.

I have two repeaters used one nested another.
part of code is shown below:

void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
       {
           RepeaterItem item = e.Item;
           if ((item.ItemType == ListItemType.Item) ||
               (item.ItemType == ListItemType.AlternatingItem))
           {

               Repeater2 = (Repeater)e.Item.FindControl("Repeater2");
               DataRowView drv = (DataRowView)item.DataItem;
               Repeater2.DataSource = drv.CreateChildView("categoryItem");
               Repeater2.DataBind();
           }
       }

This categoryItem is from this code:
objDA.Fill(ds);
            DataColumn c1 = ds.Tables["category"].Columns["ID"];
            DataColumn c2 = ds.Tables["Item"].Columns["catID"];
            dRel = new DataRelation("categoryItem", c1, c2);
            ds.Relations.Add(dRel);
            Repeater1.DataSource = ds;
            Repeater1.DataBind();


And the error message is:
 Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

Line 1222:            objDA.Fill(ds);
Line 1223:
Line 1224:            DataColumn c1 = ds.Tables["category"].Columns["ID"];
Line 1225:            DataColumn c2 = ds.Tables["item"].Columns["catID"];
Line 1226:            dRel = new DataRelation("categoryItem", c1, c2);


Well the "ID" of table "category" is the foreign key in "item" table and that foreignKey name in the "item" table is "catID".

Any help will be appreciated..

I really need some help in this.
suchita

AnswerRe: problem using dataRelation in dot net Pin
freakyit28-Jul-10 4:26
freakyit28-Jul-10 4:26 
GeneralRe: problem using dataRelation in dot net Pin
Dhyanga28-Jul-10 4:28
Dhyanga28-Jul-10 4:28 
GeneralRe: problem using dataRelation in dot net Pin
freakyit28-Jul-10 4:30
freakyit28-Jul-10 4:30 
GeneralRe: problem using dataRelation in dot net Pin
Dhyanga28-Jul-10 4:34
Dhyanga28-Jul-10 4:34 
GeneralRe: problem using dataRelation in dot net Pin
Eddy Vluggen28-Jul-10 5:03
professionalEddy Vluggen28-Jul-10 5:03 
GeneralRe: problem using dataRelation in dot net Pin
Eddy Vluggen28-Jul-10 5:13
professionalEddy Vluggen28-Jul-10 5:13 
GeneralRe: problem using dataRelation in dot net Pin
Dhyanga28-Jul-10 5:38
Dhyanga28-Jul-10 5:38 
AnswerRe: problem using dataRelation in dot net Pin
Luc Pattyn28-Jul-10 5:00
sitebuilderLuc Pattyn28-Jul-10 5:00 
GeneralRe: problem using dataRelation in dot net Pin
Dhyanga28-Jul-10 5:08
Dhyanga28-Jul-10 5:08 
AnswerRe: problem using dataRelation in dot net Pin
Luc Pattyn28-Jul-10 5:22
sitebuilderLuc Pattyn28-Jul-10 5:22 
GeneralRe: problem using dataRelation in dot net Pin
Richard Blythe28-Jul-10 5:26
Richard Blythe28-Jul-10 5:26 
GeneralRe: problem using dataRelation in dot net Pin
Luc Pattyn28-Jul-10 5:47
sitebuilderLuc Pattyn28-Jul-10 5:47 
GeneralRe: problem using dataRelation in dot net Pin
Dhyanga28-Jul-10 5:27
Dhyanga28-Jul-10 5:27 
GeneralRe: problem using dataRelation in dot net Pin
Richard Blythe28-Jul-10 5:41
Richard Blythe28-Jul-10 5:41 
GeneralRe: problem using dataRelation in dot net Pin
Dhyanga28-Jul-10 5:44
Dhyanga28-Jul-10 5:44 
GeneralRe: problem using dataRelation in dot net Pin
Richard Blythe28-Jul-10 5:54
Richard Blythe28-Jul-10 5:54 
GeneralRe: problem using dataRelation in dot net Pin
Dhyanga28-Jul-10 6:22
Dhyanga28-Jul-10 6:22 

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.