Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Strongly Typed DataSet Objects VB.Net

Options
  • 03-02-2006 11:44am
    #1
    Registered Users Posts: 7,429 ✭✭✭


    I am trying to create a DataSet in a Class but getting the error declaraion expected but when i move the code into the form it working fine.

    I have the following at getting the error in red.

    Can someone help me out please why it works under the form and not in a class

    Imports System.Data.OleDb
    Imports System.Data

    Public Class ApartmentQuote

    Dim da As New OleDb.OleDbDataAdapter

    Dim ds As New DataSet

    ds.datasetname = "Apartment"


Comments

  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    Are you using the correct namespaces in the class? It would be handy if you posted the offending classes code entire.

    Use the code tags too, that the # symbol when you're posting.


  • Registered Users Posts: 2,082 ✭✭✭Tobias Greeshman


    Have you got the code that causing the problems in one of the classes methods, like a constructor?


  • Registered Users Posts: 2,758 ✭✭✭Peace


    Without the code its impossible to tell. It could because of the scope of the variable ds.

    Post code post code....:v:


  • Registered Users Posts: 7,429 ✭✭✭Trampas


    I got it

    Sub problem.

    Thanks


Advertisement