473,289 Members | 1,756 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

Why I'm getting this error?

I'm getting an error "c:\inetpub\wwwroot\RGSSO\SO.aspx.cs(363):
'RGSSO.WebForm1.dataSetRG' denotes a 'field' where a 'class' was expected"
on the following code:
private void btnAdd_Click(object sender, System.EventArgs e)

{

dataSetRG.SOsRow myNewSOsRow;

myNewSOsRow=new dataSetRG.SOs.NewSOsRow();

myNewSOsRow=this.dataSetRG.SOs.NewSOsRow;

myNewSOsRow.SOCustomer=this.txtBoxCustomer.Text.To String();

dataSetRG.SOs.AddSOsRow(myNewSOsRow);

this.dataGridSummary.DataBind();

}

Thanks, Alejandro

Mar 2 '07 #1
4 1128
On Mar 2, 8:07 pm, "Ignacio Machin \( .NET/ C# MVP \)" <ignacio.machin
AT dot.state.fl.uswrote:
I'm getting an error "c:\inetpub\wwwroot\RGSSO\SO.aspx.cs(363):
'RGSSO.WebForm1.dataSetRG' denotes a 'field' where a 'class' was expected"
on the following code:

private void btnAdd_Click(object sender, System.EventArgs e)

{

dataSetRG.SOsRow myNewSOsRow;

myNewSOsRow=new dataSetRG.SOs.NewSOsRow();

myNewSOsRow=this.dataSetRG.SOs.NewSOsRow;

myNewSOsRow.SOCustomer=this.txtBoxCustomer.Text.To String();

dataSetRG.SOs.AddSOsRow(myNewSOsRow);

this.dataGridSummary.DataBind();

}

Thanks, Alejandro

what is dataSetRG? I assume a static object?

Mar 2 '07 #2
Hi again,

i didn't see you used someone else's (a MVP's) account ;-)

I don't know what type dataSetRG:

PutTheTypeOfdataSetRG.SOsRow myNewSOsRow = this.dataSetRG.SOs.NewSOsRow;
myNewSOsRow.SOCustomer = this.txtBoxCustomer.Text.ToString();
dataSetRG.SOs.AddSOsRow(myNewSOsRow);

this.dataGridSummary.DataSource = dataSetRG;
this.dataGridSummary.DataBind();

hope this helps
--
Milosz
"Milosz Skalecki [MCAD]" wrote:
Is it a joke you have C# MVP?
--
Milosz
"Ignacio Machin ( .NET/ C# MVP )" wrote:
I'm getting an error "c:\inetpub\wwwroot\RGSSO\SO.aspx.cs(363):
'RGSSO.WebForm1.dataSetRG' denotes a 'field' where a 'class' was expected"
on the following code:
private void btnAdd_Click(object sender, System.EventArgs e)

{

dataSetRG.SOsRow myNewSOsRow;

myNewSOsRow=new dataSetRG.SOs.NewSOsRow();

myNewSOsRow=this.dataSetRG.SOs.NewSOsRow;

myNewSOsRow.SOCustomer=this.txtBoxCustomer.Text.To String();

dataSetRG.SOs.AddSOsRow(myNewSOsRow);

this.dataGridSummary.DataBind();

}

Thanks, Alejandro


Mar 2 '07 #3
Is it a joke you have C# MVP?
--
Milosz
"Ignacio Machin ( .NET/ C# MVP )" wrote:
I'm getting an error "c:\inetpub\wwwroot\RGSSO\SO.aspx.cs(363):
'RGSSO.WebForm1.dataSetRG' denotes a 'field' where a 'class' was expected"
on the following code:
private void btnAdd_Click(object sender, System.EventArgs e)

{

dataSetRG.SOsRow myNewSOsRow;

myNewSOsRow=new dataSetRG.SOs.NewSOsRow();

myNewSOsRow=this.dataSetRG.SOs.NewSOsRow;

myNewSOsRow.SOCustomer=this.txtBoxCustomer.Text.To String();

dataSetRG.SOs.AddSOsRow(myNewSOsRow);

this.dataGridSummary.DataBind();

}

Thanks, Alejandro

Mar 2 '07 #4
On Fri, 2 Mar 2007 14:07:44 -0500, "Ignacio Machin \( .NET/ C# MVP \)"
<ignacio.machin AT dot.state.fl.uswrote:
>I'm getting an error "c:\inetpub\wwwroot\RGSSO\SO.aspx.cs(363):
'RGSSO.WebForm1.dataSetRG' denotes a 'field' where a 'class' was expected"
on the following code:
private void btnAdd_Click(object sender, System.EventArgs e)

{

dataSetRG.SOsRow myNewSOsRow;
Here an assignment is made using a c'tor. The relationship between the
types
dataSetRG.SOsRow
dataSetRG.SOs.NewSOsRow
is unclear.
>myNewSOsRow=new dataSetRG.SOs.NewSOsRow();
Here a second assignment is made to the same variable. Does the this
pointer have a member named dataSetRG that is of type dataSetRG?
>myNewSOsRow=this.dataSetRG.SOs.NewSOsRow;

myNewSOsRow.SOCustomer=this.txtBoxCustomer.Text.T oString();

dataSetRG.SOs.AddSOsRow(myNewSOsRow);

this.dataGridSummary.DataBind();

}

Thanks, Alejandro

Mar 3 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: sara | last post by:
Hi I'm pretty new to Access here (using Access 2000), and appreciate the help and instruction. I gave myself 2.5 hours to research online and help and try to get this one, and I am not getting...
8
by: Rod | last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some reason, opening some ASP.NET applications we wrote is producing the following error message: "The Web server reported...
2
by: MSK | last post by:
Hi, Continued to my earlier post regaring "Breakpoints are not getting hit" , I have comeup with more input this time.. Kindly give me some idea. I am a newbie to .NET, recently I installed...
4
by: imaloner | last post by:
I am posting two threads because I have two different problems, but both have the same background information. Common Background Information: I am trying to rebuild code for a working,...
4
by: backen | last post by:
Hi! i cant get this code to work, I get error c2065, undeclared identifier for some reason don´t really know why... this results in error C2146: syntax error : missing ';' before identifier...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.