Results 1 to 17 of 17

Thread: Datasets? - fixed it!

  1. #1

    Thread Starter
    Hyperactive Member SjR's Avatar
    Join Date
    Jul 2001
    Location
    Birmingham, UK
    Posts
    336

    Red face Datasets? - fixed it!

    OK I'm very new to .NET...
    I'm trying to get my head around ADO.NET but I can't declare a Dataset, which is kind of hindering my progress.

    When I type Dim dsTest As Dataset()
    or Dim dsTest As New Dataset()
    the word 'Dataset' has the squiggly blue line and the tooltip says... 'Type "Dataset" is not defined'

    Dataset does not appear in System.Data namespace either

    I'm sure I'm missing something really obvious, could anyone help me?
    Last edited by SjR; Dec 9th, 2002 at 07:44 AM.
    Another satisfied customer

  2. #2
    Registered User
    Join Date
    Nov 2002
    Location
    Växjö, Sweden
    Posts
    314
    I wonder what's in your System.Data namespace as my contains a Dataset object.....

  3. #3
    Registered User
    Join Date
    Nov 2002
    Location
    Växjö, Sweden
    Posts
    314
    Do you have the system.dll added as reference?

  4. #4
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    Is System.Data referenced?
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  5. #5

    Thread Starter
    Hyperactive Member SjR's Avatar
    Join Date
    Jul 2001
    Location
    Birmingham, UK
    Posts
    336
    Originally posted by Athley
    Do you have the system.dll added as reference?
    yes
    Originally posted by Cander
    Is System.Data referenced?
    yes

    look at my screen...

    Attached Images Attached Images  
    Another satisfied customer

  6. #6
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    What version of VS .NET are you using. I get DataSet on my intellisense..
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  7. #7

    Thread Starter
    Hyperactive Member SjR's Avatar
    Join Date
    Jul 2001
    Location
    Birmingham, UK
    Posts
    336
    Microsoft Development Environment 2002 Version 7.0.9466
    Microsoft .NET Framework 1.0 Version 1.0.3705


    I think its broken .........
    Another satisfied customer

  8. #8
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    I dont get it.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  9. #9

    Thread Starter
    Hyperactive Member SjR's Avatar
    Join Date
    Jul 2001
    Location
    Birmingham, UK
    Posts
    336
    I'm going to try downloading sp2 for the .net framework - I don't think I've already done that!?

    I also noticed .net framework version 1.1 beta... should I be using that I wonder... because its the framework downloads that contain the system dll files isn't it? Oh I don't know - I'm just gonna download some stuff - can't get anyworse
    Another satisfied customer

  10. #10
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    mmm no dont get Framework 1.1 yet. I dont know if it works with your current Visual Studio. Maybe ..maybe not!

    And I dont think the sp has anthing to do with it. i havent gotten sp2 or 1 on this system yet and I still get the DataSet
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  11. #11
    Lively Member
    Join Date
    Jan 2002
    Location
    Malaysia
    Posts
    64
    The reference you need to add is to System.Data

    Open your reference thingy in your solution explorer to make sure it's there. If only System is there or System.anythingelse, then you need to add System.Data manually.

    After that you'll need to add the line

    Imports System.Data

    on top of your code so that you can declare

    Dim blah as new Dataset

    otherwise you'll have to do

    Dim blah as new System.Data.Dataset everytime

  12. #12

    Thread Starter
    Hyperactive Member SjR's Avatar
    Join Date
    Jul 2001
    Location
    Birmingham, UK
    Posts
    336
    I have System.Data in my references... and despite whether I type..

    "Imports System.Data" then
    "Dim dsTest as Dataset"

    or

    "Dim dsTest as System.Data.Dataset"

    Type 'Dataset' is not defined
    Another satisfied customer

  13. #13
    Frenzied Member PilgrimPete's Avatar
    Join Date
    Feb 2002
    Posts
    1,313
    OK, straw clutching time...
    ...what version of System.Data.dll do you have (though I can't believe any version didn't have datasets considering how key they are to ADO.NET..!)

    My version (from WinCV) is as follows:
    // from module 'c:\winnt\assembly\gac\system.data\1.0.3300.0__b77a5c561934e089\system.data.dll'

  14. #14

    Thread Starter
    Hyperactive Member SjR's Avatar
    Join Date
    Jul 2001
    Location
    Birmingham, UK
    Posts
    336
    // from module 'c:\winnt\assembly\gac\system.data\1.0.3300.0__b77a5c561934e089\system.data.dll'

    looks the same
    hmmmmmm

    I've just completely re-installed .NET... still can't see the bloomin' datasets
    Another satisfied customer

  15. #15

    Thread Starter
    Hyperactive Member SjR's Avatar
    Join Date
    Jul 2001
    Location
    Birmingham, UK
    Posts
    336
    I've got 'Dataset' to appear in the namespace
    I wish I could tell you how... but it really involved temper tantrums.. Violence... and much booting and re-booting .

    Maybe the re-install helped ??
    Another satisfied customer

  16. #16
    Frenzied Member PilgrimPete's Avatar
    Join Date
    Feb 2002
    Posts
    1,313
    Gaaaaaaaaaaaahhhhhhhhhh!

    Glad it's your problem not mine

    Anyway you're far better off without datasets, I really can't understand where all that nice recordset functionality has gone...

    More seriously, could you have declared a class/type/variable/enum (something!?) as Dataset elsewhere in your app that is causing a conflict? Have you tried declaring a dataset in a 'clean' app?

    Help? I'm rambling.

  17. #17

    Thread Starter
    Hyperactive Member SjR's Avatar
    Join Date
    Jul 2001
    Location
    Birmingham, UK
    Posts
    336
    It wasn't appearing in any (clean or dirty ) apps.
    Now it's appearing in both, apps I've been working on, and new apps.

    So, don't really know the answer - although it wouldn't surprise me one bit if its this tin-pot computer I'm using thats at fault!!

    Datasets rubbish then? They looked like a good idea, which is why I was trying to learn how to do the damn things - bit complicated to start with, but once they're in place, database updates should be a piece of errrrrmm cake - or so MS would have you believe!
    Another satisfied customer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width