Stuck at the beginning

AjayKumar

New member
Joined
Jan 29, 2005
Messages
1
Programming Experience
Beginner
Hi!
I failed to create a dataset object in VB.NET as i am unable to find the class in the System.Data namespace. I imported System.Data namespace in the project but still i couldnt find it, i created the OleDbDataAdapter though.
Guys, i am really stuck at this. Please need help.
Thank You.
 
If you have the Import statement in you file, you can use something like:
Dim ds as New DataSet
Without the Imports statement it would be:
Dim ds as New System.Data.DataSet
The Import statement is a type of short hand, so that you don't have to explicitly reference the namespace each time you need to use a class. You do have to have a reference to the System.Data namespace though. I beleive the default settings for a new winForm project adds that namespace.

There is also a component in the toolbox that you can drag to a design surface. I'm not sure if it's there by default, but you can add it by right-clicking in the toolbox and selecting 'Customize Toolbox...'
 
Back
Top