DataSet Issue RRS feed

  • Question

  • I have a class library that, among other things, uses a DataSet, DataTables, TableAdabters, etc. to access data in an SQL Server database on a Win2k3 server that I'll call "server1".


    I've added a small console application within the class library solution so I can test on my workstation and the library works as anticipated.


    I wish to use this class library in another application I'm working on, a windows service that will also run on "server1".  I have a basic version of the service that compiles, has been installed and runs as anticipated, no problems.  I can even add a reference to the class library and the service still compiles and runs without a problem.  However, when I try to instatiate the class and call a method in the class library that utilizes the DataSet I'm not getting the results I'd anticipate.  In fact, I'm having trouble figuring out what is happening.  The service starts but after that, nothing seems to be happening.


    I continue to work on getting more information about what is occuring, but I have a fundamental question about the use of DataSets in a client/server development environment.  In other words, because I'm doing development on my client workstation, then moving the application to the server, it would seem that the connection to the database via the DataSet is "breaking".  Should I be doing something differently in the development and/or deployment of this application?



    Sunday, February 24, 2008 5:46 PM

All replies

  • Hi,


    hard to say what's going on.

    Can you start your test console Application on the server to get some messages what's wrong?

    Do you use a Sql-Server-UserID to sign on to the database server? Or do you use the Windows User?

    If you are not sure look at your connection string. If the connection string contains 'Integrated Security=True' you are using your windows userid.

    If you run as a windows service you have to assign a userid to this service and register the access rights for this userid within your Sql Server.




    Sunday, February 24, 2008 7:18 PM
  • Thanks for the reply, but I've figured out the problem (which is that I'm an idiot).


    I wasn't moving the DLL of the class library up to the server.  It wasn't part of the original build and didn't get installed with the original run of the setup utility.


    This brings up another question of mine, what is the best way to update an application like this?  Right now, I do my build and move the new EXE (and DLL) up to the current install folder of the application.  This seems to work fine, but seems pretty "manual", is there another way I should be deplying my changes to the server?

    Sunday, February 24, 2008 8:18 PM