Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

doesn't exist in class or namespace error when I create a dataset-.net

Status
Not open for further replies.

kisslogicgoodbye

Programmer
Mar 19, 2001
18
US
I created a dataadapter and connection. The .net interface says create dataset, I follow the wizard. I look at my code and all seems fine. I save and compile and I get the error:

C:\VISION\DataEntry\DataEntry.cs(48): The type or namespace name 'Dataset1' does not exist in the class or namespace 'DataEntry.DataEntry' (are you missing an assembly reference?)

My code:

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.ServiceProcess;

namespace DataEntry
{
public class DataEntry : System.Windows.Forms.Form {
private System.Windows.Forms.Panel MainMenu;
private System.Windows.Forms.Panel Checks;
private System.Windows.Forms.Panel ChecksForm;

private System.Data.SqlClient.SqlDataAdapter sqlDataAdapterVendorContractList;
private System.Data.SqlClient.SqlCommand sqlSelectCommandVendorContractList;
private System.Data.SqlClient.SqlConnection sqlConnectionVendorContractList;
private DataEntry.Dataset1 dataset11;
 
You need to include a "using System.Data.SqlClient;" statement.

Unlike Java, .NET does not recurse through the namespaces (you can't say "using System.Data.*"). You must explicitly include each namespace that you plan to use.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top