S
Sean M
Guest
I created a DataSet object in the App_Code directory.
I then created a DataLayer.cs class in the App_Code directory.
In the DataLayer class I am using System.Data.
Yet the compiler does not recognize my DataSet. The error asks me if I am missing a directive or an assembly reference. I dont think I am because intellisense does recognize the DataSet keyword, just not the DataSet that I created. The exact code is posted below, obviously you cannot see the DataSet in the Solution Explorer but trust me, it's there. It exact name is dsTasks.xsd and it has the attached .xss thing. Also, everything is spelled correctly. Also, I tried using DataSet ds = new DataSet("dsTasks") but I couldn't do the fill method. Forget that anyway, what I really want to know is why it doesn't even recognize dsTasks! As far as I can tell it is there, it is spelled right, the Data layer is referenced, the two files are even in the same directory, I have this same thing working in other projects.... so whats up?
Here is the error message:
CS0246: The type or namespace name 'dsTasks' could not be found (are you missing a using directive or an assembly reference?)
It is referring to the dsTasks that I am trying to have the method return.
And here is the exact code (remember dsTasks is a DataSet in App_Code and everything is spelled correctly):
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.Linq;
using System.Web;
public static class DataLayer
{
public static dsTasks PhaseDS(string path) // this is the current line the compiler is saying has an error, it says it can't recognize dsTasks
{
dsTasks tasks = new dsTasks(); // dsTasks has red squiggly lines under it
return tasks; // return the dataset
}
}
I then created a DataLayer.cs class in the App_Code directory.
In the DataLayer class I am using System.Data.
Yet the compiler does not recognize my DataSet. The error asks me if I am missing a directive or an assembly reference. I dont think I am because intellisense does recognize the DataSet keyword, just not the DataSet that I created. The exact code is posted below, obviously you cannot see the DataSet in the Solution Explorer but trust me, it's there. It exact name is dsTasks.xsd and it has the attached .xss thing. Also, everything is spelled correctly. Also, I tried using DataSet ds = new DataSet("dsTasks") but I couldn't do the fill method. Forget that anyway, what I really want to know is why it doesn't even recognize dsTasks! As far as I can tell it is there, it is spelled right, the Data layer is referenced, the two files are even in the same directory, I have this same thing working in other projects.... so whats up?
Here is the error message:
CS0246: The type or namespace name 'dsTasks' could not be found (are you missing a using directive or an assembly reference?)
It is referring to the dsTasks that I am trying to have the method return.
And here is the exact code (remember dsTasks is a DataSet in App_Code and everything is spelled correctly):
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.Linq;
using System.Web;
public static class DataLayer
{
public static dsTasks PhaseDS(string path) // this is the current line the compiler is saying has an error, it says it can't recognize dsTasks
{
dsTasks tasks = new dsTasks(); // dsTasks has red squiggly lines under it
return tasks; // return the dataset
}
}