Web Services and datasets

Thread is closed for posting
2 posts, 0 answers
  1. Paul
    Paul avatar
    114 posts
    Member since:
    May 2009

    Posted 14 May 2009 Link to this post

        I currently have a webservice that my applications talk to, to get data from the database. See below.

    How would I implement this using open access? I have already created a class library that reversed mapped my database and added that as a reference to my webservice. I have also enabled open access on my webservice and have a ObjectScopeProvider1 class.

    How would I get this data and still return as dataset.VB or C# example would ok.


    Public Function Get_Application_FolderPath() As DataSet



    Dim ds As New DataSet



    Using conn As New MySqlConnection(MySQLDBString)



    ' conn.ConnectionString =



    Dim cmd As New MySqlCommand("Select * from applicationFolderPath", conn)


    cmd.CommandType = CommandType.Text


    'cmd.Parameters.Add("UserName", UserName)



    Dim da As New MySqlDataAdapter(cmd)



    ds.Namespace =



    ds.Prefix =








    End Using



    Return ds



    End Function


  2. Alexander
    Alexander avatar
    727 posts

    Posted 15 May 2009 Link to this post

    Hello Paul,

    OpenAccess has its own disconnected API and you do not need to use DataSets. You should use the ObjectContainer class instead. It has the same API as the ObjectScope - you can create, modify and delete objects but without the need of a constant connection to the database. A ChangeSet class is used for filling and extracting data from the container. The class is serializable and can be used for transmitting the data through the service. For more details please take a look at this example.

    Kind regards,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top