Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Strongly Typed DataSet Objects VB.Net

  • 03-02-2006 10:44AM
    #1
    Registered Users, Registered Users 2 Posts: 8,790 ✭✭✭


    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, Registered Users 2 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, Registered Users 2 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, Registered Users 2 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, Registered Users 2 Posts: 8,790 ✭✭✭Trampas


    I got it

    Sub problem.

    Thanks


Advertisement