473,773 Members | 2,345 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Strongly Type Dataset

Hello
I turned Option Strict on and after I did, I am getting an error of "Option
Explicit does not allow late binding". OK great, now it is time to learn how
to create a strongly typed dataset.

The "tables" I am actually working with are just flat files, but I thought I
would go ahead and create a version of then in SQL Server and then go through
VS and have it create the XSD and the class that I would need to satisfy the
strongly typed dataset. Am I on the right track?

OK now I see the class which was generated for the table.

I did this for all three files that I am going to use, and it created three
classes.

Each class is a dataset, I only need a single dataset...Right ? Is there a way
I could have done this to generate a single dataset with three Datatables
contained in the dataset Class?

Now I need to replace the instatiation of my current dataset with this new "ds
Name" class created by the IDE? If I do an "Imports" on the dataset Class
name I can then see the datatable. I then need to change my table constructor
to the new name? Then make all the approriate name changes in the code for
the dataset and table and this will eliminate all of my errors?

If I never intend to use the SQL table and only write out the flat file, there
are probably other things I need to do to fix the class generated....is there
other things I need to do. Is there a better approach to this issue?

Thanks in advance for your assistance!!!!! !!

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Nov 20 '05 #1
2 2938
my comments below . . .

--
Regards - One Handed Man

Author : Fish .NET & Keep .NET
=============== =============== ===========
This posting is provided "AS IS" with no warranties,
and confers no rights.
"Jim Heavey" <Ji*******@hotm ail.com> wrote in message
news:3f******** @corp.newsgroup s.com...
Hello
I turned Option Strict on and after I did, I am getting an error of "Option Explicit does not allow late binding". OK great, now it is time to learn how to create a strongly typed dataset. explicitly convert/cast the type using CType or DirectCast


The "tables" I am actually working with are just flat files, but I thought I would go ahead and create a version of then in SQL Server and then go through VS and have it create the XSD and the class that I would need to satisfy the strongly typed dataset. Am I on the right track?

OK now I see the class which was generated for the table.

I did this for all three files that I am going to use, and it created three classes.

Each class is a dataset, I only need a single dataset...Right ? Is there a way I could have done this to generate a single dataset with three Datatables
contained in the dataset Class? Yes, you only need one dataset for three tables


Now I need to replace the instatiation of my current dataset with this new "ds Name" class created by the IDE? If I do an "Imports" on the dataset Class
name I can then see the datatable. I then need to change my table constructor to the new name? Then make all the approriate name changes in the code for the dataset and table and this will eliminate all of my errors? Should do, but when you build it you'll find out


If I never intend to use the SQL table and only write out the flat file, there are probably other things I need to do to fix the class generated....is there other things I need to do. Is there a better approach to this issue?

Thanks in advance for your assistance!!!!! !!
It would really help if you described in brief what you were trying to
acheive. Its a little difficult with such little real detail.





-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----

Nov 20 '05 #2
You needn't create SQL tables to define DataSet. All you need do is to edit
a DataSet in the schema designer. You can drag/drop elements/attributes
from toolbox, but not from sever explorer as you did today.

What do you mean all of your data is in flat files? I guess those are XML
files, right? You need DataSet class to access those data, right? If
those XML files has same root Node, you only need define one DataSet, which
includes three table(elements) on it.

Nov 20 '05 #3

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

Similar topics

2
2889
by: theWizK | last post by:
Hello all. I have noticed that when I generate a strongly-typed dataset from an xml schema that the DataTables that are generated have their constructors marked as internal. What this means is when I try to instantiate one of the strongly-typed tables from this dataset from a different assembly, I cannot. Let me provide examples... If I have a simple dataset like this:
1
6089
by: Job Lot | last post by:
I am confused how strongly typed dataset is different from un-typed dataset. Is there any good link explaining pros and cons of both? Which one should be used preferably?
1
3589
by: Dave | last post by:
Hi all, I've seen that many people have had this exact same problem in the past, but no-one seems to post the answer when (if) they solve it... so here we go again. If I create a strongly typed dataset from an xsd schema I've created in VS.NET 2002, instantiate and populate the dataset and write it as XML using WriteXML() the generated XML file is not valid based on the xsd file used to create the dataset.
3
1598
by: MC D | last post by:
I have a situation in which I have a strongly typed dataset based on the schema of a xml document. This works great, and OMG I love strongly typed datasets... ;o) However, The situation I have has a nested complex type. For example: <PAGE> <PAGENUMBER>1</PAGENUMBER> <PAGETITLE>This is the title</PAGETITLE> <IMAGES>
1
1193
by: Imran | last post by:
Hello, I have a typed dataset defined in my project. I am writing a user control which needs to invoke an instance of that dataset. Problem is that the page developer only provides the name of the dataset to my user control. I want my user control to invoke an instance of that dataset from its "string" representation of the type. I used type.gettype("Mydatasettype") , but ctype function would not accept it as a valid type.
5
10634
by: moondaddy | last post by:
I'm caching a dataset in an asp.net session variable to hold a user's data. one data item I need to store is an image the user uploaded. My problem is that I don't know how to get the image into the dataset because I don't know what datatype to set the dataset column and then set this image to. I saw an example where someone defended a datatable in the global class and defined the column as an object, however, when I define a strongly...
1
1901
by: PeterH | last post by:
I am developing a web service in VB.Net that returns data from a server. I have an .asmx page that uses a strongly typed dataset and I would like to return data in the form of strongly typed data table rows. However I always get an error message to do with the fact that the data set is not serializable. For example: "You must implement the Add(System.Object) method on xyz data table because it inherits from IEnumerable." The strongly...
2
1699
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
When I'm debugging a Windows Forms Application in VS2005 IDE, how can I check whether a dataset is strongly typed or not in Watch window? Are there some properties or methods only exist for strongly typed dataset?
4
3112
by: Rachana | last post by:
Hi, I have understood Data Sets but what is meant by typed/untyped/ strongly typed datasets. Can any one explain me or suggest any site/ article, to get these concepts (and their comparisions) cleared? Thanks, Rachana
0
10106
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9914
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7463
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6717
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5355
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3610
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2852
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.