473,413 Members | 2,056 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,413 software developers and data experts.

Type 'Application.DataSet' is not defined

Hey folks,

In VS 2005, I'm trying to use the DataSet wizard/designer. I can successfully go thru the entire process, but as soon as it is referenced in one of my forms, I get errors that state:

Type 'hplcContainer.POCDataSet' is not defined.

If I go into the form.designer.vb, I can fix it temporarily by either removing hplcContainer. or adding Global. in front. However, as soon as I save the form again, it rewrites the code.

Does anyone have any ideas why? I did this in a brand new application and it worked fine.

(This current application has a simple project that calls my Class Library, which is where ALL the work is.)

Thanks in advance,
Kyle
Oct 9 '07 #1
9 10107
In case anyone is interested...

It turns out that I had a class with the same name as my root namespace. I guess that confused the automatically created DataSet.

Kyle
Oct 9 '07 #2
Killer42
8,435 Expert 8TB
In case anyone is interested...
Ah, you're too quick for us. :)

Anyway, thanks for posting your results. This will be useful for anyone who comes looking for a similar answer in future.
Oct 10 '07 #3
dgzo
2
Hi. I'm having the same problem, only that I dont have a class name the same as my project and the compiler always puts before the name of the dataset, the name of my project like this:

Expand|Select|Wrap|Line Numbers
  1. Me.UnitsDS = New RequisitionPO.UnitsDS
  2.  
where RequisitionPO is the name of my project.

I temporarily fix this issue doing one of two things. Either deleting the name of my project and leaving the line like this:
Expand|Select|Wrap|Line Numbers
  1. Me.UnitsDS = New UnitsDS
  2.  
or writing the word global before the name of the project like this:

Expand|Select|Wrap|Line Numbers
  1. Me.UnitsDS = New Global.RequisitionPO.UnitsDS
  2.  
but then again, when I go to the form and compile again it rewrites the code and the error shows up. And if I add more datasets, the error is reflected in all of them and all the objects that have to do with the datasets such as tableadapters.

Can anyone give me a clue on how to fix this maddening error?

Thanks in advance

Gabriela
Feb 28 '08 #4
mmorin
1
I had the same problem but it was due to a form with the same name as the dataset. I renamed the form and everything worked correctly.

Marty

Hi. I'm having the same problem, only that I dont have a class name the same as my project and the compiler always puts before the name of the dataset, the name of my project like this:

Expand|Select|Wrap|Line Numbers
  1. Me.UnitsDS = New RequisitionPO.UnitsDS
  2.  
where RequisitionPO is the name of my project.

I temporarily fix this issue doing one of two things. Either deleting the name of my project and leaving the line like this:
Expand|Select|Wrap|Line Numbers
  1. Me.UnitsDS = New UnitsDS
  2.  
or writing the word global before the name of the project like this:

Expand|Select|Wrap|Line Numbers
  1. Me.UnitsDS = New Global.RequisitionPO.UnitsDS
  2.  
but then again, when I go to the form and compile again it rewrites the code and the error shows up. And if I add more datasets, the error is reflected in all of them and all the objects that have to do with the datasets such as tableadapters.

Can anyone give me a clue on how to fix this maddening error?

Thanks in advance

Gabriela
Apr 4 '08 #5
Killer42
8,435 Expert 8TB
dgzo, if you get a chance, please let us know how it turned out.
Apr 11 '08 #6
3 years later and this post was really helpfull. I think Microsoft could have made the error clearer or fix the mixup. It is not uncommon (although not recomended) that people name a form same as the project.
Thank you
Aug 9 '10 #7
same problem here, solution was deleting the namespace I used in a module.
visual studio walks a path of namespace.classname/formnames and if you are messing with one of those on your own you are 'het bokje'
Sep 29 '10 #8
Thanks that was really helpful
Oct 23 '10 #9
thx a looot i aprociate you for you answer
Sep 6 '12 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Fidias Gil de Montes | last post by:
In a Distributed Windows application, I receive the following message when the client calls the server: ************** Exception Text ************** System.InvalidCastException: Unable to cast...
5
by: Jason | last post by:
I am having problems understanding how to access a datasource only once, fill a single dataset, and then reference that dataset multiple times through different user controls(ascx) found on the...
7
by: | last post by:
Source Error: Line 173: sData(rownumber - 1, lcnt) = WhatCol.Value Line 174: End IF Line 175: If (sData(rownumber, lcnt) = sData(rownumber - 1, lcnt)) AND...
8
by: Vishwanathan Raman | last post by:
Hi I have a declared a static DataSet object SOBJ in Global.asax.I also have a localy defined DataSet LSOBJ in Global.asax which I am storing in Application State.Is there any technical...
1
by: Optimus | last post by:
Hi everyone, I currently develop an application in vs.net 2005 with vb.net. I was trying to use typed dataset and I've got in trouble for converting untyped dataset into Typed DataSet. I don't...
3
by: Joe Befumo | last post by:
I'm getting the following error in my application: Compiler Error Message: BC30002: Type 'ADODB.Connection' is not defined. Source Error: Line 112: if(Request.Form("HdnQuestionCount") =...
0
by: Ganesh Muthuvelu | last post by:
Hello, What is wrong with this simple schema. When I try to load it to a dataset it gives me an error, "Data type not defined" Thanks. ****************************** <?xml version="1.0"...
3
by: matt.skibbs | last post by:
When we moved a project from .NET 1.1 to .NET 2.0, we ran into an issue with some code that inserts a datatable from IDataReader.GetSchemaTable() into a dataset, and then serializes the dataset to...
8
by: =?Utf-8?B?ZG1idXNv?= | last post by:
I'm migrating a VB.NET 2003 application to VB.NET 2008. The 2003 app used the June 2005 Enterprise Library while I'm going to use the latest EntLib, 4.0 - May 2008. I copied the 2003 app to a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.