CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2009
    Posts
    2

    Strongly typed dataset combined with webservice

    Hi

    I'm using .Net 3.5 (for the record).

    I am trying to create a program that connects to a MSSQL database either through a WebService that uses Ado.Net or directly via Ado.Net.

    To try and minimize code usage, I put the part that connects to the database through Ado in a separate project, calling it CommonTypes. I am using a strongly typed dataset here.

    I have then referenced both the program and the web service to this project and have no problem making either the web service or ado directly get information and printing it.

    The problem here is that even though I have referenced to the same project in both main program and web service, I get different types, and as such can't treat them as the same type in the main program.
    when using Ado directly i get the type: CommonTypes.StrongDataSet
    and when I use the webservice i get: WebService.StrongDataSet

    Am I going about this the wrong way? Or is there any solution to this problem?

  2. #2
    Join Date
    Sep 2007
    Posts
    82

    Re: Strongly typed dataset combined with webservice

    I don't know if this helps....but check out the link below

    http://www.tech-archive.net/Archive/.../msg00035.html

    to the best of my knowledge you basically have the same strongly typed dataset but they exist in different assemblies/namespaces. If you can create a seperate assembly with the strongly typed datasets in that and then reference that assembly from both the webservice and your project you should be able to correct this error.

    hope this helps

    -zd

  3. #3
    Join Date
    Feb 2009
    Posts
    2

    Re: Strongly typed dataset combined with webservice

    OK. Thanks. I guess it makes sense somehow.
    I didn't notice any remarkable changes in performance from ADO directly and going through the web service so I decided to just use the webservice connection.

    Thanks for your help anyways

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

Featured